Hi,
I want to get a datakey value of parent grid row when we expand it to display its child rows? Any help on this will appreciate.
Thanks,
Mits
Hello Mits,
if you handle RowExpanding event on the client these two should be working:
eventArgs.get_row().get_dataKey()[0];
or
eventArgs.get_row().get_rowIslands()[0].get_parentRow().get_dataKey()[0];
Please let me know if you need further assistance
Hi Hristo,
Thanks for prompty reply. If possible can you suggest the same thing on server side? The reason is i have to do some operation on row expanding event.
you could handle WebHierarchicalDataGrid1_RowIslandsPopulating event and get datakey with:
e.Row.DataKey[0];
I hope this helps
I have tried this code by setting InitialDatabindDepth to 0. However in this scenario if i do the expand and collapse on same rows couple of times than after some time child rows are not collapsing. Can you please look into this?
Thanks for reply. My this issue has been fixed.
Regards,
InitialDataBindDepth determines how deep into the DataSource hierarchy DataBinding will proceed when the grid is first displayed. The rest of the hierarchy is loaded on demand. -1 directs the grid to be fully bound. The default value is 0 which signifies that the grid is set up for load on demand from the top level.
Here you can see all events that are fired on the server:
http://help.infragistics.com/NetAdvantage/ASPNET/2011.1/CLR4.0/?page=Infragistics4.Web.v11.1~Infragistics.Web.UI.GridControls.WebHierarchicalDataGrid_members.html
What is your scenario. Maybe we can suggest you another approach?