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
Getting list of all expanded rows so that I can open them later

I need to be able to get a list of rows (client side) that have been expanded, so that when a user reloads the page, I can then expand them.

I've seen code to get the expanded rows, but trying to expand them again, doesn't seem to work. I'm missing something obvious I'm sure.

This is the code that I found (on the forum) to get all the expanded rows:

 arrExpandedRows = $("#gridRRA").igHierarchicalGrid("allChildren");

This is what I was using to expand the rows (found in the forum):

for (i = 0; i < arrExpandedRows.length; i++){
var rowDom = $("#" + arrExpandedRows[i].id);

Parents Reply
  • 0
    Offline posted in reply to Vasya Kacheshmarova

    Hello  I tired your code but after refresh the grid ... row is getting collapse

    function SetExpandedRows(gridName, expandedRowIds) {
    //Loop through the array of row id's
    for (var i = 0; i < expandedRowIds.length; i++) {
    //Get the reference to the row in the grid
    //var gridRow = $("#" + gridName).igGrid("rowById", expandedRowIds[i]);

    localStorage.setItem("id", JSON.stringify(expandedRowIds));
    if (localStorage) {
    $.each(JSON.parse(localStorage.getItem("id")), function () {
    var newEl = $("tr[data-id='" + this + "']");
    $("#" + gridName).igHierarchicalGrid("expand", newEl);


No Data