Check documentation for the latest version of dhtmlxSuite Data Updating HowTos DHTMLX Docs

Data Updating HowTos

How can I alter the default styles set for responses?

You can alter the default styles for each state, as follows:

dp.styles.error = ""; //avoids a special style for the 'error' response
//you should write it on the client side (in your HTML file)
//dp -  dataProcessor object

How can I implement transactions?

Connector allows using transactions for INSERT/UPDATE/DELETE operations (make sure that the used DB engine has support for transactions).

To activate the transaction mode, use the TransactionMode property. For more details see the 'Transactions' guide.

    //for all records inside of single request
connector.Request.TransactionMode = TransactionMode.PerRequest; 
//or 
    // for each record in request
connector.Request.TransactionMode = TransactionMode.PerRecord;

How can I link dataProcessor with connector?

To link dataProcessor with connector you should specify the connector file as a parameter of dataProcessor's constructor:

dp = new dataProcessor("myconnector.php");
dp.init("mygrid");

How can I update data on the server side?

To update data on the server side, you should initialize dataProcessor and link dhtmlxConnector to it on the client side . Default updating will be done automatically. For more details, see the guide 'Client-side requirement - dataProcessor'.

How can I save data changes made in a form (simple way)?

dhtmlxConnector automatically exec CRUD operations for next patterns:

//to get data of a DB record
   GET: connector.aspx?action=get&id={some}
//to delete data of a DB record
   GET: connector.aspx?action=delete
//to update data of a DB record
   GET: connector.aspx?action=delete
   POST: id={some}&property_name={value}
//to insert a new record to DB
   GET: connector.aspx?action=insert
   POST: property_name={value}
Back to top