mcfarland

Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • in reply to: Issue while exporting current jq grid data to excel. #102378
    mcfarland
    Participant

    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..

    in reply to: Export jQGrid data to Excel – Solution that worked for me #102380
    mcfarland
    Participant

    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..

    in reply to: Export jQGrid data to Excel – Solution that worked for me #102318
    mcfarland
    Participant

    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…..

Viewing 3 replies - 1 through 3 (of 3 total)

Stay connected with us in your favorite flavor!