jQuery UI Widgets Forums DataTable Batch update on window close

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 9 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Batch update on window close #65949

    James Lavery

    I’ve got a dataTable in a Window, in which I’m allowing the user to edit a subset of the properties of the JSON objects returned from my services.

    On close (when the Ok button on the window is clicked), I need to perform the CRUD operations carried out in the window (i.e. I don’t want to just bind the dataTable directly to the service so that CRUD occurs when each row is updated).

    So I have two challenges:

    1. I need access to the full JSON objects returned from the service, as my server-side operations work on a full object. Is this available via the DataAdapter or source? I cannot find it – the only data I can find (using the debugger) contains the datafields I’ve specified.

    2. I need to track the modified, added, removed rows. I know how to do this manually, but I wanted to check whether the DataTable, DataAdapter or source have something already available which will help with this.

    Batch update on window close #65993


    Hello James Lavery,

    1) The full loaded data is available in the data adapter’s loadComplete callback (as dataAdapter.records). For more information, please refer to the jqxDataAdapter Documentation.

    2) Neither of these tracks the changes. We suggest you use the methods beginUpdate and endUpdate for your “batch update”. Call beginUpdate, make all your changes, then call endUpdate. The data table will be refreshed only once, at the end of the update.

    Best Regards,

    jQWidgets team

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

You must be logged in to reply to this topic.