I am sorting locally on igHierarchicalgrid. Sorting feature works only for parent level. I want it to sort child level data as well.
Is there a way to do this?
Hello Jeffrey,
It could be done. First of all every row should be expanded, so that the child grids are created. Once this is done, on the columnSorted event call sortColumn function to every child grid. In order for this to work the child grids must have the same columns as the parent grid. For example (After every row has been expanded):
{ name: "Sorting", inherit: true, columnSorting: function(evt, ui) { var grids = $($("#hierarchicalGrid")[0].rows).find("table"); for(var i = 0 ; i < grids.length ; i++ ) { $("#" + grids[i].id).igGridSorting("sortColumn", ui.columnKey, "ascending"); } }}
Note that this is customly made and might have unexpected behavior in certain cases.
Feel free to contact me if you have further questions.
Regards,Ivaylo HubenovEntry-level developer
Thanks!!!