Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Azeez on May 27, 2009 04:42
open dhtmlx forum
Synchronizing my DHTMLXGRID's with a databaseTable

I have multiple DHTMLXGRIDS each in separate DHTMLXWINDOWS in my page. I need to keep each DHTMLXGRID synchronized with some data in my DB . The DHTMLXGRIDs are used only for viewing data. If the data in my DB changes it should reflect on my DHTMLXGRIDs. I am using AJAX to request the data from my DB periodically every 5 seconds or so. I want to know how is it possible to display the latest data on each DHTMLXGRIDs?

Lets say i have 3 DHTMLXGRIDs each showing data corresponding to 3 tables in my db. every 5 seconds i send an ajax req to the server and get an xml string having all the 3 DB tables data. I split these into 3 xml strings. now i suppose i have to call dhtmlxgridobject.parse(xml_string) on each DHTMLXGRID object. But how can i get a reference to those DHTMLXGRID object..
Pls help....
Answer posted by dhxSupport on May 27, 2009 05:21
If you have 3 grid on your page you should know references to that grids: 
var grid1
var grid2
var grid3
You can use that references to update your grids. 
There is no possibility to get grid object if you know to which dhtmlxWindow it has been attached.