I have a Master/Detail grid and have added some buttons with custom command names in my details grid and have attached this script to the client OnCommand event. (I have omitted code that is not relevant).
The code triggers successfully but the problem is that the GridCommandEventArgs that I receive in the code-behind event (RadGrid1_ItemCommand) contains item data only for the parent row. How can I retrieve the item data for the child row that triggered the command?
I have also noticed that if I set the FireCommand method to trigger a "Delete" command, then the GridCommandEventArgs does contain the child row data, but when I change it to a custom command name, it then only sends the parent row data.
I need to be able to at least retrieve the datakey values for the child row.
function OnCommand(sender, eventArgs)
{
// code omitted here that used radConfirm to get user to approve the selected command
// ...
// code which is executed if user confirms selected command
var grid = sender;
var MasterTable = grid.get_masterTableView();
itemIndex = eventArgs.get_commandArgument();
masterTable.fireCommand("MyCustomCommand", itemIndex);
}
The code triggers successfully but the problem is that the GridCommandEventArgs that I receive in the code-behind event (RadGrid1_ItemCommand) contains item data only for the parent row. How can I retrieve the item data for the child row that triggered the command?
I have also noticed that if I set the FireCommand method to trigger a "Delete" command, then the GridCommandEventArgs does contain the child row data, but when I change it to a custom command name, it then only sends the parent row data.
I need to be able to at least retrieve the datakey values for the child row.