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
10
Page > 1 Issue with Hierarchial Grid -- Trying to get Add New Row
posted

I have an Hierarchial Grid that has 2 bands and allows paging.  Whenever I have a value in the 2nd band for one of the records and I'm on a page of the grid > 1, I have an issue with my javascript InitializeLayout handler.

 Here's my initialize handler event:

function igridPayGrid_InitializeLayoutHandler(gridName){
  var grid = igtbl_getGridById(gridName);   var rowAddNew;
  var row;

  for (i=0;i
    row = grid.Rows.getRow(i);
    if (row.ChildRowsCount != 0){
      // get the add new row in the 2nd band
      rowAddNew = row.Rows.AddNewRow;
      // TODO: work with the add new row     }
  }
}

Whenever I load up page 1 of my grid, rowAddNew is defined as the Add New Row.  Whenever I load up any page >1 in my grid, rowAddNew is undefined. 

 Any thoughts on this?

Parents
No Data
Reply
  • 10
    posted

    function igridPayGrid_InitializeLayoutHandler(gridName){
     //Add code to handle your event here.
     var grid = igtbl_getGridById(gridName);
     var rowAddNew;
     var row;
     
     for (i=0;i<grid.Rows.length;i++){
         row = grid.Rows.getRow(i);
         if (row.ChildRowsCount != 0){
             // get the add new row in the 2nd band
             rowAddNew = row.Rows.AddNewRow;
             // style the add new row appropriately
                StyleAddNewRow(rowAddNew);    
         }
        }     
    }

Children
No Data