Check documentation for the latest version of dhtmlxSuite Step 5. Save Data Changes on the Server DHTMLX Docs

Step 5. Save Data Changes on the Server

Now we have a form bound to a grid and can edit this grid through the form. Hovewer, the changes will be saved only on the client-side. They won't be sent to the server. To set things right, we need to initialize dataProcessor for the grid. Since you've done it, all the changes made in the grid will be reflected in the database.
We will save the changes after the user clicks the "Submit" button.

To know more on the topic, read the following tutorials:

To save data changes on the server:
  1. Initialize dhtmlxDataProcessor and attach it to the grid using the code as in:

    "index.html" file

    var mydp = new dataProcessor ("griddata.php"); //inits dataProcessor
    mydp.init(mygrid);//associates the dataProcessor instance with the grid
  2. Attach a handler function to the onButtonClick event to send the updated data to the server each time the user clicks the "Submit" button:

    "index.html" file

    myform.attachEvent("onButtonClick", function(id){
        myform.save(); //sends the values of the updated row to the server
    });
That's all. We believe you have enjoyed the tutorial and known how to implement a bunch grid-form in the app.

Follow our other tutorials to be a true DHTMLX expert.
Back to top