Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Michael on Jul 20, 2009 09:25
open dhtmlx forum
Mover boxes using dthmlxGrid

Hi,

I have 2 grids that I am using for mover boxes. For example I can select a user from the "Available" list on the left and move them into the "Selected" grid on the right.

The problem is that I am doing it like this:

oGridUsersAvailable.deleteSelectedRows();
oDPUsersAvailable.sendData();

oGridUsersSelected.clearAll();
oGridUsersSelected.loadXML("reload.php");

The problem is that since dp sends asynchronous, the timing does not alway workout. The the reload of "selected" grid is happening too fast. Ideally I would like to wait until my row has been removed from "Available" grid before refreshing "Selected" grid.

Please Advise.
Answer posted by dhxSupport on Jul 21, 2009 09:40
You can use "onBeforeUpdated" dhtmlxDataProcessor's event to define if "delete" operation was passed:
oDPUsersAvailable.attachEvent("onBeforeUpdate",function(){
oGridUsersSelected.clearAll(); 
oGridUsersSelected.loadXML("reload.php");
});
Please find more information about DataProcessor's events here http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Dataprocesor_usage.html#grid_art_dataprocessor


Answer posted by Michael on Jul 21, 2009 11:54

I am trying to attach an event to the dataprocessor and everything I have tried, I get the following error.

 

Error: Object doesn't support this property or method

Answer posted by dhxSupport on Jul 22, 2009 02:07
"attachEvent" method is available in dhtmlxDataProcessor version 2.1+. Latest dhtmlxDataProcessor version is available at the Standart suite package which you can download here http://www.dhtmlx.com/docs/download.shtml
Answer posted by Michael on Jul 22, 2009 11:00
If I download the dhtmlxDataProcessor 2.1 will it break any of my existing code.  I currently and using 2.0.
Answer posted by Michael on Jul 22, 2009 11:02
If I download the dhtmlxDataProcessor 2.1, will it break any of my existing code?  I am currently using 2.0.
Answer posted by dhxSupport on Jul 23, 2009 02:14
 dhtmlxDataProcessor 2.1 will not break any of your existing code.