- Define a custom button via the GridViewSettings.CommandColumn.CustomButtons collection;
- Customize the client-side CustomButtonClick event handler via the GridViewSettings.ClientSideEvents.CustomButtonClick property: pass the destination Url/Address (generated via the Url.Action helper method) as a parameter;
- Handle the client-side ASPxClientGridView.CustomButtonClick event;
- Retrieve the clicked row's keyValue via the client-side ASPxClientGridView.GetRowKey method. Use the EventArgs e.visibleIndex property as a parameter;
- Add the retrieved keyValue parameter to the specified destination Url;
- Navigate to the specified Url by changing the window.location.href property;
- Retrieve the passed keyValue via an argument of the invoked Action's parameter.
↧
How to call an Action method via a custom button and pass a row's key as a parameter
↧