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
90
Keeping nodes in two trees synched up client side?
posted

I have two webdatatrees that I am using to represent a file system structure of folders and documents that I am using for file move.  Basically, customers who need to move files would select them from the first tree and drop them on the second tree (similar to the Multi Tree sample - including image below).  Both trees represent the same file system so they are identical but I only allow drag from the first tree and only allow nodes to be dropped on the second tree. The webdatatrees remove the selected node and add to the second tree a-ok, but here is the problem:  I need the new folder/file positions reflected in the first tree (currently just removes it) and the old folder/file positions to be removed from the second. 

For example:  I drug the Whitesnake folder from the first tree and dropped it in the Y.Malmsteen folder (circled in red) on the right.  The original position of the Whitesnake folder is circled in blue in the second tree -- I would prefer that disappear as well in the second tree and display in the correct folder in the first tree (marked with ??? in blue).  Is there an easy way to do this client side?

Parents
No Data
Reply
  • 49378
    posted

    Hi Labrown,

    There does not seem to be a straightforward approach to synchronize multiple WebDataTrees on the client. 

    As far as nodes not disapearing from their original position, this may be due to the DragDropMode of the trees being set to "Copy".

    I have created a sample for you which demonstrates how multiple trees can be synchronized server-side. The sample uses a simple xml data source. Reflecting the node changes between the trees effectively takes place in the NodeDropped event handlers of the trees.

    Hope this helps. Please contact me if you have any questions.

    Best Regards,

    Petar Ivanov
    Developer Support Engineer
    Infragistics, Inc.
    https://ko.infragistics.com/support

    WebDataTreeMulti.zip
Children