Hi all,

in my project, i am getting gridpanel values by javascript code

and i am using gridpanel paging.

For ex. i have 400 records, and paging size is 100 so i can get current 100 records,

i want to get all records by this below code, how can i do that ..?

Thank you


<script type="text/javascript">
var exportData = function (grid) {
var store = grid.store;
var values = getValues(store, grid);
GridData.setValue(values);
}
function getValues(store, grid) {
var noRows = store.data.items.length;
var noColumns = grid.colModel.columns.length;
var json = '[';
for (rowIndex = 0; rowIndex < noRows; rowIndex++) {
json = json + '{';
for (colIndex = 1; colIndex < noColumns; colIndex++) {

var cm = grid.getColumnModel();
var col = cm.getColumnById(cm.getColumnId(colIndex));
if (!col.hidden) {
var name = grid.getColumnModel().getDataIndex(colIndex);
json = json + '"' + name + '":';
var record = grid.store.getAt(rowIndex);
json = json + '"' + record.get(name) + '"';
if(colIndex != noColumns-1)
json = json + ',';
}
}
json = json + '}';

if (rowIndex != noRows-1)
json = json + ',';
}
json = json + ']';
return json;
}
</script>