Can I read somewhere the actual sql query from php or java?
When I use : var rowid = jQuery(this).jqGrid('getGridParam','selrow'),
I read only the current page of grid.
I need all the rows of the grid according to the current filter or actual SQL query.
Thanks.
1 Answers
In JS you can use (where list1 is grid id)
var rows = $('#list1').jqGrid('getDataIDs');
e.g. To select all grid rows
// reset all selection
jQuery('#list1').jqGrid('resetSelection');
// get all ids and select
var ids = jQuery('#list1').jqGrid('getDataIDs');
for (i = 0; i < ids.length; i++) {
jQuery('#list1').jqGrid('setSelection', ids[i], true);
Your Answer