We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

TreeNode Validate

Is there any way to validate TreeNode during drag and drop in TreeView control?


1 Reply

VK Vinoth Kumar K Syncfusion Team January 10, 2008 11:57 PM UTC

Hi Kathy,

Thanks for using Syncfusion Products.

Validate TreeNode during drag and drop in TreeView control?
>>>>>>>>>>>

To validate TreeNode during drag and drop, you need to handle the ClientSideOnNodeDrop event. In that event handler, you can check your condition (as per your requirement specify the condition) and if it is satisfied, True will be returned and the node will be dropped else the function will be cancelled.

Here is the attached sample that shows you "How to validate treenode during the DragandDrop in Treeview control?". It checks the condition to drop the child nodes of "MailBox" alone. "Personal Folder" child nodes cannot be dropped into MailBox. Please refer to the sample in the below link which illustrates the above.

http://websamples.syncfusion.com/samples/Tools.Web/6.1.0.34/F70989/main.htm


Please let me know if you have any questions.

Regards,
Vinoth



Loader.
Live Chat Icon For mobile
Up arrow icon