Questions about tree feature

Hello,

I have a desktop application that I would like to rewrite in PHP. A colleague has bought for us a license of dhtmlx pro. I am wondering if it is feasible to have the same functionality using PHP+dhmtlx.

Here are the key feature of the tree in my desktop application:

  1. 15000 items in average, with up to 10 levels of depths
  2. items are sorted alphabetically
  3. the tree shows the state of various programs and objects, thus it changes regularly. In my desktop app I update it every minute. Some items might change, disappear or appear.
  4. users can filter the tree (based on name and other properties of the items)
  5. when the tree is updated, the state of the items (if they did not disappear) must stay the same (open/close)

I reckon that dhmtlxtree should be able to handle such specification, but I would like to have your confirmation and idea on the implementation. It is especially not clear to me how to have lazy loading with a tree that changes on regular basis server-side. Also the filtering is not clear to me.

Thank you very much.

Barth

Hello,

You can use our PHP connector as the ready solution on server:

dhtmlx.com/docs/products/dhtmlxC … ndex.shtml

15000 items in average, with up to 10 levels of depths

You will need to use Smart XML Parsing:

dhtmlxTree/samples/12_loading_processing_data/10_pro_smart_parsing.html

items are sorted alphabetically

Items should be sorted on server. You can use ORDER BY in the SQL query. If you are using our connectors, you’ll need to use render_sql with ORDER BY as in:

$tree = new TreeConnector($res);
$tree->render_sql(“SELECT taskId,taskName FROM tasks ORDER BY taskName”,“taskId”,“taskName”,"",“parentId”);

In my desktop app I update it every minute. Some items might change, disappear or appear.

You can call smartRefreshBranch method with the interval.

users can filter the tree (based on name and other properties of the items)

Tree does not provide ready solution for filtering. So, you will need to delete all items from the tree (deleteChildItems method) and load the new data that correspond filtering rules.

when the tree is updated, the state of the items (if they did not disappear) must stay the same (open/close)

smartRefreshBranch will do.