Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
830
UnSort for igHierarchicalGrid
posted

I am Using a igHierarchicalGrid which has 3 or 2 level of data based on situation.

We are allowing custom sorting on it, and also have a button to Reset Sort.

Now when I click on Reset sort, for 2 level of grid data it working fine but then there is 3 level of grid data it unsorts only parent and child and does not unsort the 3rd level any Idea why

here is ny reset Sort code

var colLength = $("#" + gridId).igGrid("option", "columns").length;
var colKey;
for (var i = 0; i < colLength; i++) {
colKey = $("#" + gridId).igGrid("option", "columns")[i].key;
$("#" + gridId).igGridSorting("unsortColumn", colKey);
}

Parents
No Data
Reply
  • 1235
    posted

    Hello Jeffrey,

    The reset sort function should be called for every child grid of the main grid. You can access every child by the following query:


    $("#hierarchicalGrid").find("table")

    Note that a child grid is created after the first expansion of its parent row, therefore if a row has not been expanded at least once, the query above will not find the child table of the row.

    Please feel free to contact me if you need further assistance.

    Regards,
    Ivaylo Hubenov
    Entry-level developer

Children
No Data