The "getboundrows" method of jQWidgets Grid returns all rows - Example:
var data = generatedata(5);
var source = {
localdata: data,
datafields: [{
name: 'firstname',
type: 'string'
}, {
name: 'lastname',
type: 'string'
}, {
name: 'productname',
type: 'string'
}, {
name: 'date',
type: 'date'
}, {
name: 'quantity',
type: 'number'
}, {
name: 'price',
type: 'number'
}],
datatype: "array"
};
var adapter = new $.jqx.dataAdapter(source);
$("#jqxgrid").jqxGrid({
width: 600,
height: 100,
theme: 'energyblue',
source: adapter,
sortable: true,
selectionmode: 'singlecell',
columns: [{
text: 'First Name',
datafield: 'firstname',
columngroup: 'Name',
width: 90
}, {
text: 'Last Name',
columngroup: 'Name',
datafield: 'lastname',
width: 90
}, {
text: 'Product',
datafield: 'productname',
width: 170
}, {
text: 'Order Date',
datafield: 'date',
width: 160,
cellsformat: 'dd-MMMM-yyyy'
}, {
text: 'Quantity',
datafield: 'quantity',
width: 80,
cellsalign: 'right'
}, {
text: 'Unit Price',
datafield: 'price',
cellsalign: 'right',
cellsformat: 'c2'
}]
});
$("#jqxbutton").jqxButton({
theme: 'energyblue',
width: 200,
height: 30
});
$('#jqxbutton').click(function () {
var rows = $('#jqxgrid').jqxGrid('getboundrows');
var result = "";
for (var i = 0; i < rows.length; i++) {
var row = rows[i];
result += row.firstname + " " + row.lastname + " " + row.productname + " " + row.date + " " + row.quantity + " " + row.price + "\n";
}
alert(result);
});
http://jsfiddle.net/jqwidgets/3LLVW/. Having the indexes of the selected rows, you can loop through the rows and check whether the row's boundindex is within the rowIndexes Array. If it's not, then the row is not selected.
Example: http://jsfiddle.net/jqwidgets/yzqswcvr/