Categories | Question details Back To List | ||
In your features documentation you mention that
dhtmlxTreeGrid has the ability to load data dynamically, but ... In your features documentation you mention that dhtmlxTreeGrid has the ability to load data dynamically, but it seems that it can only be loaded by scrolling (a great feature). However, I was wondering if it also had the ability to load the tree nodes as they are expanded (via AJAX). Answer posted on Feb 27, 2007 19:39
Sure, the grid can load child rows while expanding parent row. You can check samples/pro_treeGrid_dynamic.html (the sample available only in PRO package).
<div id="gridbox" width="100%"
height="250px"
style="background-color:white;overflow:hidden"></div> ================== pro_treeGrid_dynamic.php ======================== <?php //the php file must be recognized as XML document so necessary header sent header("Content-type:text/xml"); //default xml file header (UTF-8 is a common value, but in some cases another encoding must be used) print('<?xml version="1.0" encoding="UTF-8"?>'); //the script receive a parent item
id from GET scope as my_script.php?id=PARENT_ID if (!isset($_GET['id'])) $_GET['id']=0; //write top tag of xml document, the parent attribute contain id of parent row print ("<rows
parent='".$_GET['id']."'>"); //in real code here you must take
records from DB for($i = 0;$i<20;$i++){ //row tag
contain a id and xmlkids attributes print "<row id='a_{$_GET['id']}_{$i}' xmlkids='".(($i%4==0)?1:"")."'>"; //value of row print ("<cell image='folder.gif'>Item {$_GET['id']}:{$i}</cell>"); //close row tag print
("</row>"); print("</rows>"); </script> Answer posted by sematik (Support) on Dec 07, 2014 00:09 If you haven't found the needed information there and still looking for a solution, you will find the additional help checking ajax file upload with progress bar and javascript calendar date. |