- 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.
Question Comments
Added By: Sorin Sandu at: 4/28/2015 1:42:07 AM
On me s parameter is undefined.
What I am doing wrong ?
Hi Sorin,
To process your recent post more efficiently, I created a separate ticket on your behalf: T235581: Parameter is undefined when using a solution provided in the E4827 code example. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.