Two grid, 2 data processor

Hi everyone

the situation is simple. I have experimenting issue with multiple data processors so I tried to do a simple test to identify my mistake.

I tried to create 2 identical grids, same code, linked with 2 different data processor.
In the first grid…when I am updating the grid, I can see in the debug console provided with dhtmlxdataprocessor_debug.js the request send to the server side with all needed details
but for the second one …nothing…and the data are updated on server. so if I use it in a different context with different grids, data, code ,… when i have a bug I cannot debug it
Is there a way to solve it and make this console working any time??

Thanks in advance
D.
Here the code i used for my test. Very simple code.

grid1 = new dhtmlXGridObject('grid1_container');
grid1.setImagePath("../codebase/imgs/");
grid1.setHeader("Type de Groupe, Label, Description");
grid1.setInitWidths("105,110,175");
grid1.setColAlign("left,left,left");
grid1.setColTypes("coro,ed,ed");
grid1.setColSorting("int,str,str");
grid1.setSkin("dhx_skyblue");
grid1.init();
grid1.loadXML("../codebase/php/get_acl_group.php");

DataProcessor1 = new dataProcessor("../codebase/php/update_acl_group.php");
DataProcessor1.init(grid1);

grid2 = new dhtmlXGridObject('grid2_container');
grid2.setImagePath("../codebase/imgs/");
grid2.setHeader("Type de Groupe, Label, Description");
grid2.setInitWidths("105,110,175");
grid2.setColAlign("left,left,left");
grid2.setColTypes("coro,ed,ed");
grid2.setColSorting("int,str,str");
grid2.setSkin("dhx_skyblue");
grid2.init();
grid2.loadXML("../codebase/php/get_acl_group.php");

DataProcessor2 = new dataProcessor("../codebase/php/update_acl_group.php");
DataProcessor2.init(grid2);

I’ve solved with the refresh button with this procedure, but if you find better let me know:

RefreshScreen function () {
mygrid.clearAndLoad ("…/ php / get_monthly.php? id_azienda = “+ combo.getSelectedValue ());
mygrid2.clearAndLoad (”…/ php/get_monthly_view2? id_azienda = "+ combo.getSelectedValue ());

}

Thanks

I have experimenting issue with multiple data processors
Normally it is expected to have one dataprocessor per component.
It is more simple to change settings of single existing dataprocessor, than manage multiple ones.

thanks guys for you answer

I think you did not get my issue…maybe my english is too poor…

I do have one dataprocessor by component. you can see that in the code.

my issue is not to refresh data in the grids…my issue is not in the code …
the problem is that the debug window ( dhtmlxdataprocessor_debug.js) do not show events for more that one dataprosessor. if I declare the dataprocessor for grid one first…then I can see the connections to server side for the grids one but not for the grid two…same if I declare the dataprocessor for grid two first then I cannot see the connections to server side for the grids one but only for the grid two

can I set that somewhere to see events for both grid at the same time?

Thanks in advance
D

After initing the second dataprocessor , you can add the call similar to next

myDataProcessor2._console.style.top = “420px”;

It will make both debug outputs visible.

Awesome Stanislav…working fine thanks

Should be mentioned that this line should be removed if the dhtmlxdataprocessor_debug.js is removed …otherwise you should experienced bad side effect