Connector itself lets just pass data from server- to client-side.
When you need to pass data back (e.g. you've updated record and want to save updates in database) you should use dataProcessor additionally.
Shortly, data exchange with dataProcessor can be characterized as follows:
To use functionality of dataProcessor you should add the only file - dataprocessor.js.
To initialize dataProcessor you should write 2 commands:
var dp = new dataProcessor(url) dp.init("mygrid")
To link dataProcessor with connector you should specify connector file as a parameter of the constructor:
dp = new dataProcessor("myconnector.php"); dp.init("mygrid");
Dataprocessor has its own client-side logger, which can be enabled by including one additional js file - dhtmlxdataprocessor_debug.js
Dataprocessor allows to validate data before sending to server-side (see details here).
Details of server-side validation also see in the related chapter of this documentation.
As it was mentioned before, to affect on default data processing either on server- or client-side you should use events (they can be either dataProcessor or dhtmlxConnector events).
To affect on server-side processing you should use one the following events of dhtmlxConnector:
Changing on client-side can be done in one of the following ways:
dp.defineAction("update",function(sid,response){ ... return true;// return false to cancel default data processing at all })
$data->set_status("my_status");
For more details see chapter 'Custom status'