Reputation: 325
I have a project that uses jquery's jqgrid. How do I loop through the grid rows and get to a value?
somethign like
var rows = $(#mygrid).rows
foreach(row in rows)
alert(row["firstName"])
I have even seen something like this, but no examples of what to do with it.
var rows = $('#grid').jqGrid('getCol','firstName');
Upvotes: 7
Views: 20402
Reputation: 2014
try this:
var rows = jQuery("#grid").getDataIDs();
for(a=0;a<rows.length;a++)
{
row=jQuery("#grid").getRowData(rows[a]);
row.colname1; row.colname2;
}
Upvotes: 15