Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jqgrid Export to Excel #45

Open
iamarshad opened this issue Mar 27, 2019 · 0 comments
Open

Jqgrid Export to Excel #45

iamarshad opened this issue Mar 27, 2019 · 0 comments

Comments

@iamarshad
Copy link

I am using Jqgrid 4.4 version for my codeigniter website. I have been trying to export the Jqgrid values to excel, When i Use this function

("#export").on("click", function(){
grid.jqGrid("excelExport",{
includeLabels : true,
includeGroupHeader : true,
includeFooter: true,
fileName : "ship-to-attention.xlsx",
maxlength : 40 // maxlength for visible string data
})
})

It shows an error in console stating that
uncaught type error: cannot read property 'indexOf' null

excelExport : function(o) {
o = $.extend({
exptype : "remote",
url : null,
oper: "oper",
tag: "excel",
exportOptions : {}
}, o || {});
return this.each(function(){
if(!this.grid) { return;}
var url;
if(o.exptype == "remote") {
var pdata = $.extend({},this.p.postData);
pdata[o.oper] = o.tag;
var params = jQuery.param(pdata);
if(o.url.indexOf("?") != -1) { url = o.url+"&"+params; }****//

Here on the above line.

                else { url = o.url+"?"+params; }
                window.location = url;
            }
        });
    }
});

Do anyone know about this, Anyone who can solve this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant