Categories | Question details Back To List | ||
Realtime capabilities of DHTMLX suite What I would like to know is: Can data be fed in realtime into DHTMLX controls with ease ? For instance letting the data changes flow into one central data point; which then propagates those changes to interested controls ? Answer posted by Alex (support) on May 27, 2009 05:56 Hello All dhtmlx components are client-side. What can be done to update controls in realtime ... You can try to set timeout function that will refresh data from a server with the necessary interval. Answer posted by Kai Tischler on May 27, 2009 10:58 Take an Engine that delivers data in realtime to the browser client as a given; the question is: Has the DHTMLX suite a component which can be fed by such an Engine ? And can the DHTMLX controls be bound to data that changes in realtime ? Answer posted by Alex (support) on May 28, 2009 05:00 The dhtmlx components provide following methods to reload its content: dhtmlxtree: 1) tree.deleteChildItems(0) in combination with tree.load(xml_source) to load tree once again; 2) smartRefreshBranch(0,source) dhtmlxgrid: 1) grid.clearAndLoad(xml_source); 2) grid.updateFromXML(...) dhtmlxcombo: combo.clearAll(true) and then combo.loadXML(...); Answer posted on Jul 23, 2009 13:05 In the docs it is written: updateFromXML(url, insert_new, del_missed, afterCall) refresh grid from XML ( doesnt work for buffering, tree grid or rows in smart rendering mode ) This sounds like a serious limitation with respect to the DHTMLX's realtime capabilities ... A full-blown example showing off DHTMLX's realtime capabilities would be really great :-) ! Answer posted by Alex (support) on Jul 24, 2009 02:03 Hello, these limitations are not actual for the latest grid version. There is only limitation for grid with dynamic smart rendering as only part of nodes are loaded. The sample, that demonstrates different ways of grid refresh, can be found in the documentation dhtmlxGrid/samples/initialization_loading/grid_refresh.html http://dhtmlx.com/docs/products/dhtmlxGrid/samples/initialization_loading/grid_refresh.html Answer posted on Jul 24, 2009 11:11 Several new questions: - Can I invoke 'updateFromXML' with subsecond frequency - e.g. 10 times per second ? - URL: Must this be an URL to a remote XML file ? Or can it be a JS String or Object (xmlhttprequest or XML island) - What about support for other formats ? E.g. JSON ? I would like to listen to JSON data changes on the client-side; and for each such change, invoke 'updateFromXML' or 'updateFromJSON', respectively - In the default (XML) format, only whole rows can be refreshed; there is the alternative 'xmlB'-format, however: It has cells explicitly ordered with tags <first>, <second>, etc.; would it be possible to target single cells for refresh when using this format ? Meaning that I provide as input to 'updateFromXML' only the new data for one single cell ? Answer posted by Alex (support) on Jul 27, 2009 03:24 >> Can I invoke 'updateFromXML' with subsecond frequency - e.g. 10 times per second ? The new updateFromXML call should be executed only after the previous one is done. So, you should use onXLE event too. It is called when xml loading (update xml) is loaded and processed. function refresh(){ if(fl) { fl =0; tree.updateFromXML(...);} } tree.attachEvent("onXLE",function(){ fl =1;}) >> URL: Must this be an URL to a remote XML file ? Or can it be a JS String or Object (xmlhttprequest or XML island) updateFromXML supports only loading from xml file. But loading from xml island or string is necessary, you can set necessary flags and call other methods for xml loading: grid._refresh_mode=[true,true,false]; grid.parse(xml_string) >> What about support for other formats ? E.g. JSON ? Unfortunately, only xml update is supported. >> etc.; would it be possible to target single cells for refresh when using this format ? Only default format is supported by updateFromXML. |