jQWidgets Forums

jQuery UI Widgets Forums General Discussions Updating Json Data

This topic contains 2 replies, has 2 voices, and was last updated by  SylvainD 12 years, 4 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Updating Json Data #13053

    SylvainD
    Member

    Hello,

    I need a little help concerning the update of the data in JSON.

    I defined my source like this
    v

    ar source = {
    datatype: "json",
    datafields: [
    { name: 'UserName' },
    { name: 'FirstName' },
    { name: 'LastName' },
    { name: 'Email' },
    { name: 'IsApproved', type: 'bool' },
    { name: 'IsLocked', type: 'bool' },
    { name: 'LastLoginDate', type: 'date' },
    { name: 'Id' }
    ],
    url: 'AccountManager/GetUsers',
    id: 'Id'
    };

    My Adapter like this :

        dataAdapter = new $.jqx.dataAdapter(source, {
    async: false
    });

    Now I need to call the json again to refresh the datas.
    If I try to do a full process I get an error message (something about the length). In the forum, on another subject, the answer is “update the datas dynamically instead of creating the grid again”. But can I do that ? (please do not send me back to this documentation (http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxdataadapter/jquery-data-adapter.htm) which I don’t understand. I need a real example of what to do if possible with a JSON call (not a local array or an xml file, like in all examples).

    Thanks

    Updating Json Data #13055

    Peter Stoev
    Keymaster

    Hi SylvainD,

    The help topic which you pointed out says what needs to be done: “To perform data binding operation with the jqxDataAdapter plug-in, you need to call its dataBind method”.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Updating Json Data #13068

    SylvainD
    Member

    Arg .. it works .. so easy …

    Thanks Peter

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

You must be logged in to reply to this topic.