Hi,
I have a grid with 3 level hierarchy. I wanted to get the client id of the expaned/collapsed detailtable when the expand/collapse image button is clicked.The detailtable just below the button expanded/collapse.
I can get this work for two level by the following code
But incase of 3 level hierarchy i get the value of "eventArgs.get_itemIndexHierarchical()" for the level two "expand/collapse" click as something like "2:0_2" and hence not able to index the detailtable array.
I need to do this for totally different issue though it seems from code above that i am just hiding / showing the detail table. All i need is the client id for the detailtable for the expanded/collapsed row.
Appreciate any help on this.
Thanks,
Sudhir.
I have a grid with 3 level hierarchy. I wanted to get the client id of the expaned/collapsed detailtable when the expand/collapse image button is clicked.The detailtable just below the button expanded/collapse.
I can get this work for two level by the following code
<ClientSettings AllowExpandCollapse="True"> |
<ClientEvents OnHierarchyCollapsed="Collapsed" /> |
<ClientEvents OnHierarchyExpanded="Expanded" /> |
</ClientSettings> |
<script type="text/javascript" language="javascript"> |
function Collapsed(sender, eventArgs) { |
var radgrid = sender; |
var detailTablesArray = radgrid.get_detailTables(); |
document.getElementById(detailTablesArray[eventArgs.get_itemIndexHierarchical()]._data.ClientID).style.display = "none"; |
} |
function Expanded(sender, eventArgs) { |
var radgrid = sender; |
var detailTablesArray = radgrid.get_detailTables(); |
document.getElementById(detailTablesArray[eventArgs.get_itemIndexHierarchical()]._data.ClientID).style.display = "inline"; |
} |
</script> |
But incase of 3 level hierarchy i get the value of "eventArgs.get_itemIndexHierarchical()" for the level two "expand/collapse" click as something like "2:0_2" and hence not able to index the detailtable array.
I need to do this for totally different issue though it seems from code above that i am just hiding / showing the detail table. All i need is the client id for the detailtable for the expanded/collapsed row.
Appreciate any help on this.
Thanks,
Sudhir.