jQWidgets Forums

jQuery UI Widgets Forums Grid jqxGrid refresh, refreshdata, reload from server solved

This topic contains 2 replies, has 3 voices, and was last updated by  leela 8 years, 10 months ago.

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

  • jamiegau
    Member

    It took me a long time to work this one out and it is poorly documented..

    I have a jqxGrid loading from a json data source..
    I changes the data on the server and want the table to update to reflect..

    Using jqxGrid refresh and refreshdata does nothing for this..
    What you need to do is get to the dataAdaptor you connected the jqxGrid to, and give it a

    MyDataAdaptor.dataBind();
    and it will re-bind to the data, or in another description, re-issue the request to the server for the data and update its binding. The jqxGrid will then update to reflect.

    One thing I could not figure out.. If I only have a reference to the grid.. for example

    $(‘myGridDiv’).jqxGrid(‘getSource’).dataBind(); // This does not exist, but would be nice..

    I could not find a way to do this and had to make sure a veriable with the MyDataAdapter variable was in scope..

    Is there a way to archive the above?

    Thanks,
    James


    novascape
    Participant

    James, unless I misunderstand your question, you can just do this:

    $(“#myGridDiv”).jqxGrid(‘updatebounddata’);

    Hope this helps


    leela
    Participant

    //To reload grid
    $(“#gridId”).jqxGrid(‘updatebounddata’, ‘cells’);

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

You must be logged in to reply to this topic.