Hi, sorry if this is a basic question but I need some direction on how to call editItem() client-side on a child row in a hierarchical grid (which could have 3 or more levels).
I understand that the get_itemIndexHierarchical() returns a string representing the path and also how some recommend using the last part after the last underscore. But I have had no luck figuring out how to use it and all my iterations of code end up either blowing up with id or object is null or it selects the parent.
Current iteration of my code:
Can anyone help point me in the right direction?
I have pondered using the string ("0:0_0:0_0") and parsing it to calculate a row index however it seems I would have to traverse child items or recursively search for an item to pass it to editItem()? I have set HierarchyLoadMode="Client" and GroupLoadMode="Client" although I'm not using groups anyway. And client settings are:
I have trawled many forum postings but can't seem to find anything similar to what I want to achieve, i.e. putting the row I double click into edit, via editItem(), and not just the parent row.
Any help very much appreciated.
I understand that the get_itemIndexHierarchical() returns a string representing the path and also how some recommend using the last part after the last underscore. But I have had no luck figuring out how to use it and all my iterations of code end up either blowing up with id or object is null or it selects the parent.
Current iteration of my code:
function
ElementRowDblClick(sender, eventArgs) {
var
grid = sender;
var
MasterTable = grid.get_masterTableView();
var
row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
debugger;
$find(
"<%= rgData.MasterTableView.ClientID %>"
).editItem(row);
}
Can anyone help point me in the right direction?
I have pondered using the string ("0:0_0:0_0") and parsing it to calculate a row index however it seems I would have to traverse child items or recursively search for an item to pass it to editItem()? I have set HierarchyLoadMode="Client" and GroupLoadMode="Client" although I'm not using groups anyway. And client settings are:
<
ClientSettings
AllowExpandCollapse
=
"true"
>
<
ClientEvents
OnRowDblClick
=
"ElementRowDblClick"
/>
<
Selecting
AllowRowSelect
=
"True"
/>
</
ClientSettings
>
I have trawled many forum postings but can't seem to find anything similar to what I want to achieve, i.e. putting the row I double click into edit, via editItem(), and not just the parent row.
Any help very much appreciated.