jQWidgets Forums

jQuery UI Widgets Forums Grid Export to excel?

Tagged: 

This topic contains 6 replies, has 2 voices, and was last updated by  jose Ivan 12 years, 6 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • Export to excel? #9211

    jose Ivan
    Member

    Hi , I really don’t understand  how  export data works. Do i have to configure something in exportdata.js or exportgridata.js ? something about server host ? because i got a error and I work with aspx and my server it’s IIS.

    it’s simple but i don’t know why it doesn’t works .

    $("#jqxgrid").jqxGrid('exportdata', 'xls', 'jqxgrid');

    if I export to xls or html  i get this error

    TypeError: Cannot call method ‘toString’ of undefined

    1. arguments: Array[2]
    2. get message: function () { [native code] }
    3. get stack: function () { [native code] }
    4. set message: function () { [native code] }
    5. set stack: function () { [native code] }
    6. type: “non_object_property_call”
    7. __proto__: Error

     

     

    Export to excel? #9220

    Peter Stoev
    Keymaster

    Hi jose Ivan,

    The provided information is not enough for reproducing the reported behavior. If you wish us to test your scenario, please send us a sample to support@jqwidgets.com which demonstrates it. Modification of any file coming with the non-commercial license is prohibited. Please, read the EULA for details.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Export to excel? #9299

    jose Ivan
    Member

    Thanks for reply , when i said “Do i have to configure something ” I mean if I have to change any property because i was reading the documentation and I see this “The last parameter is optional and determines the url of the export server. By default, the exporter is hosted on the jQWidgets website.”

    My projects it’s on ASP.net and it’s kind difficult send u.!!!

    Export to excel? #9561

    jose Ivan
    Member

    Hi , I was trying to find the error when i trying to export.

    In your example “Export data” you don’t have a checkbox column and works fine but if you add a checkbox column it gives me error.

    Export to excel? #9565

    jose Ivan
    Member

    I added to your example checkbox column and works fine ! but in my doesn’t work.

    Export to excel? #9566

    jose Ivan
    Member

    I got a question I added a Column type checkbox but this column doesn’t exist in my dataarray , so when grid has bindinComplete I search this column and i set the value to false. When I try to export when try to searh the column type doesn’t find so it return string.

    To export Do i have to add this column to my object datasource ?

    Export to excel? #9569

    jose Ivan
    Member

    Which it is best way to bind the grid?

    In your example got this .

    var data = generatedata(100);
    var source =
    {
    localdata: data,
    datatype: "array",
    updaterow: function (rowid, rowdata) {
    // synchronize with the server - send update command
    }
    };
    var dataAdapter = new $.jqx.dataAdapter(source);

    In my example i got this =>

    		 var respuesta = $.parseJSON(result.d);
    var source = {
    datatype: "json",
    datafields: [
    { name: 'ready', type: 'boolean' },
    { name: 'isclient', type: 'boolean' },
    { name: 'indice', type: 'int' }
    ],
    id: methods.getID()//return my ID
    };
    $.map(respuesta.result, function (n, i) {
    n.ready = 0; // I set the values of columns that not in my array so I add.
    n.isclient = 0;
    n.indice = i + 1;
    });
    source.localdata = respuesta.result;
    var cantidad = respuesta._datas.length;// I add the other datafields.... this come the server and i don't know the names.
    for (var i = 0; i < cantidad; i++) {
    source.datafields.push({ name: respuesta._datas[i].datafields });
    }
    var dataAdapter = new $.jqx.dataAdapter(source);
    $('#name').jqxGrid({ source: dataAdapter });

    WHen i Try to export the first column type boolean it gives me error

     var u = function (E, B, C, A, G, F, D) {

    this is because “this.element” is undefined. In your example comes pretty well.

    var t = a(this.element);
     u(r, t, true, false, this, s, v);
Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.