jQWidgets Forums

jQuery UI Widgets Forums Grid couldn't save grid with first row as datepicker

This topic contains 4 replies, has 2 voices, and was last updated by  Hristo 9 years, 5 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author

  • Monish
    Participant

    Hi

    When i try to save a jqxgrid data to back end, i’m getting the following error in browser console,
    Uncaught TypeError: I.getTime is not a function in jqx-all.js file. Check this demo, in which i tried to display final json data in alert and it works fine in jseditor. But the above error shows when i try the same in my tool and the json data alert is not displaying. Kindly help..

    Thanks,
    Monish


    Monish
    Participant

    Hi

    I was wrong in my previous post. I’m getting the same error in demo i mentioned too. Kindly help in why i’m getting that error.


    Hristo
    Participant

    Hello Monish,

    I would like to present You this example.
    And one more option with property exportdata. #var data = $("#jqxgrid").jqxGrid('exportdata', 'json');

    The fourth parameter is optional and determines the array of rows to be exported.
    By default all rows are exported. Set null, if you want all rows to be exported.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com


    Monish
    Participant

    Hi Hristo,

    Thanks for the reply. But i am not able to understand with the example you provided and i tried the things you said in my example and getting the same error. Could you help me by correcting the example i have posted earlier??

    Thanks,
    Monish


    Hristo
    Participant

    Hi Monish,

    Here is how to export only the first row of a grid to JSON:

    $("#sPlanSave").click(function() {
        var firstRowObject = $('#reportGrid').jqxGrid('getrows')[0]; // exports the first row to a JavaScript object
        var firstRowJSON = $("#reportGrid").jqxGrid('exportdata', 'json', null, false, [firstRowObject]); // exports the first row to JSON
     });

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.