Hi everyone,
I'm trying to do something I thought was quite simple. I have a RadGrid bound to a webservice (working fine!). For different reasons, I need a custom edit command for the grid. With Serverside-binding this is easily achieved using a simple GridButtonColumn and a custom CommandName. On the server I was used to get the edited row via
However, due to the client-side binding to a webservice, that is no longer possible. So I thought I'd get it client-side instead and send it to the server separately (using RadAjaxManager for instance). However, the client-side OnCommand event does not seem to offer any way of getting a dataKeyValue, dataItem or even rowIndex of the gridRow that was clicked. I tried something like this:
Obviously to no avail...
I guess my question boils down to:
Is there any practical way of getting a reference to the dataItem or even a rowIndex to the server on ItemCommand when the RadGrid is bound to a webservice?
Thanks in advance!
I'm trying to do something I thought was quite simple. I have a RadGrid bound to a webservice (working fine!). For different reasons, I need a custom edit command for the grid. With Serverside-binding this is easily achieved using a simple GridButtonColumn and a custom CommandName. On the server I was used to get the edited row via
Dim
dataItem
As
GridDataItem =
DirectCast
(e.Item, GridDataItem)
dataItem.GetDataKeyValue(
"id"
)
However, due to the client-side binding to a webservice, that is no longer possible. So I thought I'd get it client-side instead and send it to the server separately (using RadAjaxManager for instance). However, the client-side OnCommand event does not seem to offer any way of getting a dataKeyValue, dataItem or even rowIndex of the gridRow that was clicked. I tried something like this:
function
OnCommand(sender, args) {
if
(args.get_commandName() ==
"Edit1"
) {
var
CommandArg = args.getDataKeyValue(
"id"
);
}
}
Obviously to no avail...
I guess my question boils down to:
Is there any practical way of getting a reference to the dataItem or even a rowIndex to the server on ItemCommand when the RadGrid is bound to a webservice?
Thanks in advance!