Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jqGrid get all ids

Tags:

jqgrid

I've noticed a small bug with jqgrid that if you have virtual scrolling set to 1 and try and try to select all rows it doesn't actually select them all meaning when you call

$("#file-grid").jqGrid('getGridParam','selarrrow'); 

to get all selected row data it doesn't actually get all the data. I was wondering if there was a method to get all row ids, selected or not using jqgrid.

like image 646
Yawn Avatar asked Jul 18 '10 20:07

Yawn


2 Answers

Use the following if you're not using pagination:

var allRowsOnCurrentPage = $('#file-grid').jqGrid('getDataIDs');
like image 164
Donald Taylor Avatar answered Dec 14 '22 23:12

Donald Taylor


could you try getRowData() with no parameters - it should return all of the rows in the grid:

var allRowsInGrid = $('#file-grid').jqGrid('getRowData');

I got this from the jqGrid wiki:

http://www.trirand.com/jqgridwiki/doku.php?id=wiki:methods

like image 20
Sean Avatar answered Dec 14 '22 22:12

Sean