Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Abbie on Dec 16, 2009 16:24
open dhtmlx forum
dhtmlxtree - updating opened item

Hello,

I'm updating (add, update and delete) my tree data with a frameset consisting of data input and tree frames.

When a sub-item is added, updated or deleted from an item that was already loaded and opened, the following code snippet is used to update the item in order to display the current sub-items state.

tree.updateItem(id, "newLabel", tree.getItemImage(id,0), tree.getItemImage(id,1), tree.getItemImage(id,2));
tree.refreshItem(id);

The problem is, this method causes refresh of all sub-items every time an update occurs. This is not particularly efficient especially where there are large number of sub-items involve.

My question is, what can be done to have refreshed only the sub-item affected by update.

Thanks for your support!
Answer posted by Alex (support) on Dec 17, 2009 01:52

Hello,

if you use PRO edition, it's possible to update only the sub-items of the next level by smartRefreshItem method tree.smartRefreshItem(id,source). In case of dynamic loading tree.smartRefreshItem(id)