Hi Guys
I have a requirement to have a context menu on a grid row triggered when a cell is clicked.
I have this working, using the following :
What I can't seem to do is get a handle in the idex and at the server the row(ID) data.
I have also had a play by setting the clientEvents on the grid - this works following your examples where I can get the row id server side and update the row and perform the AJAX update.
The trouble with this approach is that the entire row is the trigger for the event, not just a targeted cell.
I have tried playing with the JS to get (Sender, EventArg) in to the JS from my posted code, btu can't figure it out.
How can I do this.
Andy
I have a requirement to have a context menu on a grid row triggered when a cell is clicked.
I have this working, using the following :
RowDataItem("Event").Attributes("href") = "#"
RowDataItem("Event").Attributes("onclick") = [String].Format("return showPriorityMenu(event)")
function showPriorityMenu(e) {
var contextMenu = $find("<%= rmPriority.ClientID%>");
$telerik.cancelRawEvent(e);
if ((!e.relatedTarget) || (!$telerik.isDescendantOrSelf(contextMenu.get_element(), e.relatedTarget))) {
contextMenu.show(e);
}
}
What I can't seem to do is get a handle in the idex and at the server the row(ID) data.
I have also had a play by setting the clientEvents on the grid - this works following your examples where I can get the row id server side and update the row and perform the AJAX update.
The trouble with this approach is that the entire row is the trigger for the event, not just a targeted cell.
I have tried playing with the JS to get (Sender, EventArg) in to the JS from my posted code, btu can't figure it out.
How can I do this.
Andy