I experience a problem with my project application.
I use 3 components there: dhtmlxLayout, dhtmlxGrid and dhtmlxScheduler. I also have dhtmlxDataProcessor included so both grid and scheduler can work with MySQL database on the server side.
I can update both grid and scheduler from user interaction of from the script level. The problem appears when trying to do 2 modifications from a single function (after new event is entered into scheduler, I modify one of the grid cell’s value. That triggers both DataProcessor connections (I believe) and only one of them - scheduler - ends successfully. If I use _debug version of dataprocessor, then grid value is saved to the db but not scheduler’s one. Strange…
Any idea why this happen and what’s more important - how to update both values from both components?
Thank you Stanislav, that was my assumption. Yes, I use 2 different instances:
ddpGrid = new dataProcessor( ‘grid_update.php’ );
and
dpScheduler = new dataProcessor(“events2.php”);
So now it seems I do something wrong, which is the better option since it can be easier to fix
Please find the attached demo (including db dump).
The demo uses Suite 3.5 and Scheduler 3.5 beta (as of 08.08.2012). But previously I had the same problem with all components being in version 3.0. efirma2.zip (529 KB)
You have connector code for the scheduler, and custom saving code for the grid, which is fine - but they expect data in different format. ( scheduler - all data encoded in one request, custom code - simple, one record submit )
To instruct grid’s dataprocessor, to send only one data add the next line
I have tried the dpGrid.setTransactionMode(“GET”, false); before but I just did it once again and it alone did not work the magic.
I must admit you lost me here:
What is exactly I should do to both, save new/modified event data and change the value in the grid successfully? Can you provide a code sample how to achieve that according to the demo code?
When scheduler.js included on the page it automatically enables support of connectors, so all dataprocessors will work in POST-all-at-once mode, and you need to use to call setTransactionMode for the grid’s connector manually to change the used protocol for it to GET-one-model
Thank you for the explanation, it was a bit complicated but finally it worked. The trick was to place the setTransactionMode call AFTER dataProcessor init for the component.
Again, many thanks!
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan