jQWidgets Forums

jQuery UI Widgets Forums DataTable data table refresh

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • data table refresh #77532

    arkgroup
    Participant

    I have data table that receive data from sql server using ajax call. On click on the button, I have popup with data fields that save data back to sql on button click.
    I tried to refresh data in data table by calling $(“#dataTable”).jqxDataTable(‘updateBoundData’) and then hide popup $(“#popupWindow”).jqxWindow(‘hide’); This did not work. The only way I can get this to work is to call ajax again, get source, dataAdapter.
    I also tried to add $(“#dataTable”).jqxDataTable(‘refresh’); with no luck.
    Is there easy way to refresh data table after data has been changed?

    Thanks

    data table refresh #77561

    Vladimir
    Participant

    Hello arkgroup,

    If the data you are updating in the popups is part of the data in the dataTable you should definetely check this demo. It displays how to create a popup editor for a row, and how to update the values of the dataTable and will also communicate with the server to update the necessery data.

    If however the update your sending is not directly related, you probably need to call dataAdapter.dataBind(); which will force the dataAdapter to request the data again, and then update the dataTable, also note you probably want to do this in the success callback of your update, to make sure that it requests the new data after your update has been successful.

    Best Regards,
    Vladimir

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.