Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by ruquia on Dec 22, 2008 04:16
open dhtmlx forum
Disable tree node based on time

As suggested by you i need to use the js file  dhtmlxtree_li.js   but i dont have that js file can you please send me the js file,
 also i want to disable the tree node on some condition how do i set the condition  i dont want by default to be disabled like this
       <item text="Top 50" id="top50" locked="true">
 
 on condition like
var tree = dhxAccord.cells("a1").attachTree();
  if(time>6 and time <18)
{
tree.setItemLocked("item_id");
}
 
can this be possible please suggest me..
 


 
Answer posted by Support on Dec 22, 2008 04:45
>>  but i dont have that js file can you please send me the js file,
This is part of pro edition of dhtmlxtree 
If you are have pro version - please check codebase/ext/dhtmlxtree_li.js , it it still somehow missed - please contact us directly at support@dhtmlx.com and provide your ref. number - we will send you necessary js file. 

>> also i want to disable the tree node on some condition  
There is no native support for such use-case, you can use js command ( lockItem ) instead of attribute and place all necessary logic in js code.
Answer posted by Support on Dec 22, 2008 04:51

tree.loadXML(url,function(){
   if (some_condition) tree.lockItem("top50");
});