Hi Tony,
         Thanks for responding.
One possible solution is to use getrowdata, but with number of records relative big by example 1000.
Â
the problem is i canuse get row data for filtered records but when you want to select all the records to export to excel only first page is capturing suppose if i have 670 pages in that only first page records is showing in the excel..
hi tony,
            i didn’t understood your answer.
We are using filter tool bar on export to excel;the export to excel code was copied from code project (Mikes).The problem is that we are able to get all the records to excel from grid,when we filter with particular name we get some records like 10 records i need those 10 records to excel ,if we do filter also we are getting all the records to excel not filtered records.
$(“#list”).jqGrid(‘filterToolbar’, { stringResult: true, searchOnEnter: true, defaultSearch: “cn” }).navButtonAdd(
‘#pager’, {caption:”Export to Excel”,
buttonicon:”ui-icon-disk”,
onClickButton:function() {ExportDataToExcel(“#list”);
},
position:”last”
});
Â
function ExportDataToExcel(tableCtrl) {
ExportJQGridDataToExcel(tableCtrl,”sample.xlsx”);
}
Â
function ExportJQGridDataToExcel(tableCtrl, excelFilename) {Â Â
var allJQGridData = $(tableCtrl).jqGrid(‘getGridParam’, ‘data’);
 // var allJQGridData = $(tableCtrl).jqGrid(‘getRowData’);
 var jqgridRowIDs = $(tableCtrl).getDataIDs(); // Fetch the RowIDs for this grid
 var headerData = $(tableCtrl).getRowData(jqgridRowIDs[0]);
If i comment getgrid param and if i use getrowdata i cna get filtered records but not all …
i want to satisy both the condiitons how can i acheive this..
Hi betty,
             I am wondering like if you find the solution for (
If I like to export all data (e.g. totally 18 records, 10 displayed in current grid and 8 in second grid page), is there a way to capture all 18 records without invoking the backend?)
because mine also the same problem,i am not finding any solution only first page data is capturing in excel …
I am using
var jqgridRowIDs = $(tableCtrl).getDataIDs(); // Fetch the RowIDs for this grid
 var allJQGridData = $(tableCtrl).jqGrid(‘getRowData’);
 var headerData = $(tableCtrl).getRowData(jqgridRowIDs[0]);
Â
Plz help me out…..
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top