Hi,
Is it possible to attach a context menu to a nested grid ? I currently have a radGrid with a nestedGrid and I use the following code to attach a menuContext
For the "parent" grid, it works really great, but it doesn't work for the nestedGrid. In fact, I have the following error :
Cannot call method 'get_element' of undefined.
So, anyone may help me please ?
Is it possible to attach a context menu to a nested grid ? I currently have a radGrid with a nestedGrid and I use the following code to attach a menuContext
function RowContextMenu(sender, eventArgs) {
var menu;
var ownerTable = eventArgs.get_tableView();
if (ownerTable.get_name() == "Grid") {
menu = $find("<%=RadContextMenuUser.ClientID %>");
}
else if (ownerTable.get_name() == "NestedGrid") {
menu = $find("<%=RadContextMenuUsersRole.ClientID %>");
}
var evt = eventArgs.get_domEvent();
if (evt.target.tagName == "INPUT" || evt.target.tagName == "A") {
return;
}
var index = eventArgs.get_itemIndexHierarchical();
document.getElementById("radGridClickedRowIndex").value = index;
document.getElementById("radGridClickedTableId").value = ownerTable._data.UniqueID;
sender.get_masterTableView().selectItem(sender.get_masterTableView().get_dataItems()[index].get_element(), true);
For the "parent" grid, it works really great, but it doesn't work for the nestedGrid. In fact, I have the following error :
Cannot call method 'get_element' of undefined.
So, anyone may help me please ?