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
195
Loop through all rows in an igGrid
posted

How do I loop through all rows in an igGrid and extract the cell values?

Parents
  • 18204
    Suggested Answer
    Offline posted

    Hi dtwilliams,

     

    Thanks for posting in our forums!

    There are several methods to get the data from the igGrid's rows/cells.  Depending on what exactly you need, you can access all the data directly through the grid's datasource.  You can access the grid's datasource with the following code which can be looped through:

    var ds = $("#grid1").igGrid("option", "dataSource");

    If you need only the rows that are being filtered or on a current page, you can get the rows and reference their row id (primary key) with the following code:

    $grid.igGrid("getCellValue", rowId, "Name")

    You can find more information on the various methods and options for the igGrid in our API documentation here:

    http://help.infragistics.com/jQuery/2013.2/ui.iggrid#methods

    Please see the attached sample that demonstrates these two methods.  If you have any questions or concerns with this, please let me know and I will be glad to help.

    igGrid - LoopThroughRows.zip
Reply Children