Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
865
How to hide the tree nodes in client-side?
posted

Hi,

 

     I have created a page where I am using the UltraWebTree control to display the list of the entire folder and their contents using a web method and the binding it to the tree control using XML Data source, the checkbox property is set to true for Tree control. Also in the same page I have a list box and a web image button. When the user clicks on the web image button, the files that are checked should be moved to the list box.

 

      The moving of the files is done in the client–side event of the web image button. What I would like to do is that when a file is moved, (I am not physically moving the file from that folder) I just want to hide the corresponding node of that filename in the tree control and also I want to store the node id of that node.

 

     What I have done is that, in the click event of the web image button, I am traversing the tree and getting the ids of the node and also the filename that is checked, and storing it in a hidden variable. Then I am again traversing the tree control and removing the nodes that are checked. The problem that i face is that if there are a large no of folder and files present, it takes a very long time to move the file and also to remove them (sometime the page get crashed as a result of this) as I am traversing the tree control twice. Is there any way that I can increase the performance? If so how can it be done? Is there another way to HIDE the tree nodes in client-side?

Thanks

Raja

Parents
No Data
Reply
  • 28464
    posted

    Hello Raja,

    Thanks for writing. Unfortunately a client-side hideNode function is not available,since hiding a node (especially if it has child nodes) affects how the treeview and connected images are rendered, so this is not possible without a roundtrip back to the server.

    I really am lost as to how in this situation things can get faster, the only thing that is coming to my mind is to use one of the built-in AJAX functionality modes of the treeview, via the LoadOnDemand property (e.g. ManualSmartCallBack - although this does have its limitation, at least the treeview will not be displayed at once, but only the nodes requested by the end user) 

Children
No Data