I have a child grid of an igHierarchicalGrid where the datasource is set in event iggridchildcreating. I need to be able to refresh (i.e. change the child to a different datasource) just this child grid without affecting any other child grid. Is there a way to do that after the associated parent row has already expanded and the child grid has been populated? I tried using the "dataBind" against the child grid after changing the datasource , but this did not work.
Hello,
In case that you would like to change the data for any particular child level and keep the columns collection the same my suggestion is to get the corresponding child grid by its id and set the new data source via the dataSource option. Since every child grid is an instance of igGrid changing the data source should help you achieve your requirement. For example:
$("#changeDS").click(function(){ $("#hierarchicalGrid_0_Products_child").igGrid("option", "dataSource", products ) });
I am attaching a small sample illustrating my suggestion for your reference.
In case that you would like to change columns structure, not just the underlying data you will have to destroy the igHierarchicalGrid and recreate it again with the new columns structure.
I am glad that you find my suggestion helpful.
Thank you for using Infragistics components.