jQWidgets Forums

jQuery UI Widgets Forums Grid update grid data using editpopup window

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

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

  • matc1
    Member

    Hello, i use grid with json data and mysql backend

    i’ve a problem when i update db values (with editpopup windows)
    all data saved but grid don’t display any changes.

    Here’s my code

    updaterow: function (rowid, rowdata)
    {

    var data = "update=true&cmd=registrati&id_utente="+rowdata.id_utente+"&univoco="+rowdata.univoco+"&firstname=" + rowdata.firstname + "&lastname=" + rowdata.lastname + "&company=" + rowdata.company;
    data = data + "&email=" + rowdata.email + "&workphone=" + rowdata.workphone;
    $.ajax({
    dataType: 'json',
    url: 'server_post.php',
    data: data,
    success: function (data, status, xhr) {
    $('#jqxgrid').jqxGrid('updatebounddata');
    alert('Data Saved!');
    }
    });

    I use updatebounddata, but there is a better way to do this?

    Thank’s a lot.


    Peter Stoev
    Keymaster

    Hi matc1,

    The ‘updaterow’ function is called by the Grid when a cell value or row is changed. The following samples illustrate it when the function is called: createremoveupdatedata.htm and popupediting.htm. If you update your DB Values on the server, the ‘updaterow’ function will not be called.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    matc1
    Member

    thank’s a lot man!

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

You must be logged in to reply to this topic.