Hi,
Very new to the RAD controls so please bear with me as I have moved over from Infragistics and CSOM is totally different.
I have implemented a context menu using the RadContextMenu and so far so good. However I can't work out how to access the data for the selected row client side.
What I am trying to do is to get a value from a cell in the row clicked on when the context menu was invoked. I have tried :-
var commandName = args.get_item().get_text();
if (commandName == "Properties")
{
// Get the row selected in the tree
var treeList = $find("<%= componentTree.ClientID %>");
var row = treeList.get_selectedItems()[0];
var componentID = treelist.getCellByColumnUniqueName(row, 'EmployeeID');
alert(componentID);
// ...amd from the row get the component id
window.open("./componentproperties.aspx?componentid=" + componentID + "&src=compview");
}
But this does not work - reading a bit further I don't think that the get_selectedItems is returning the selected rows which is a bit of a flaw in my understanding of this. Any advice please on how to get the value of call from the selected row?
Very new to the RAD controls so please bear with me as I have moved over from Infragistics and CSOM is totally different.
I have implemented a context menu using the RadContextMenu and so far so good. However I can't work out how to access the data for the selected row client side.
What I am trying to do is to get a value from a cell in the row clicked on when the context menu was invoked. I have tried :-
var commandName = args.get_item().get_text();
if (commandName == "Properties")
{
// Get the row selected in the tree
var treeList = $find("<%= componentTree.ClientID %>");
var row = treeList.get_selectedItems()[0];
var componentID = treelist.getCellByColumnUniqueName(row, 'EmployeeID');
alert(componentID);
// ...amd from the row get the component id
window.open("./componentproperties.aspx?componentid=" + componentID + "&src=compview");
}
But this does not work - reading a bit further I don't think that the get_selectedItems is returning the selected rows which is a bit of a flaw in my understanding of this. Any advice please on how to get the value of call from the selected row?