jQWidgets Forums

jQuery UI Widgets Forums DataTable Refresh DataTable after database edit

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 10 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Refresh DataTable after database edit #60908

    hk
    Participant

    I am using the DataTable with an edit dialog box. As soon as I hit sve on my dialog box it saves to the table and I can see it.

    I updated the function to update the database and that works too but it wont refresh the table

    I can do one or the other but not both at the same time.

    here is the updaterow code
    updaterow: function (rowid, rowdata, commit) {
    // synchronize with the server – send update command
    var data = “update=true&CustomerID=” + rowdata.CustomerID + “&ContactName=” + rowdata.ContactName + “&ContactTitle=” + rowdata.ContactTitle;
    data = data + “&CompanyName=” + rowdata.CompanyName;
    $.ajax({
    dataType: ‘json’,
    url: ‘test_data.php’,
    data: data,
    success: function (data, status, xhr) {
    // update command is executed.
    commit(true);
    }
    });
    }

    Refresh DataTable after database edit #60947

    Peter Stoev
    Keymaster

    Hi hk,

    What do you mean by refresh the table? When you call its “updateRow” method, the table is refreshed real-time and you see the updated row. The “updaterow” callback of the source object is only for synchronization between DataTable changes and your Server.

    Best Regards,
    Peter Stoev

    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.