Hi,
There's a sample included with NetAdvantage called UltraTree Drag and Drop that demonstrates how to implement dragging and dropping nodes in the tree. Assuming you chose to install the samples when you installed NetAdvantage, it will already be on your hard drive.
Hi Mike, Thanks for your reply, I can see the Example: WinTree-> Drag and Drop, I have one question: How can I move Europe Node to Asia Node? Do you any idea?
- Asia
-- Europe
- Africa
- South America
-- Brazil
Thanks in advande.
Well, the sample is set up in such a way that moving one continent node under another continent node is not allowed - since that doesn't make sense. You can only place a country under a continent.
I understand, I have one requeriment to move one Node to another Node: (Continent to Continent), in my case: (Group Tools to Group Tools)
Dou you have any idea?
Thanks.
Have you looked at the sample code? There's code in the sample to handle all sorts of drag and drop scenarios and the validate which drops are valid. You just need to change that logic so that it allows you to drop wherever drops are valid.
You're always going to have to do some validation and disallow some drops. For example, you cannot allow a user to drop a node onto one of it's own child nodes.
Thansk for all,
These examples are a bit difficult to understand, I proved that it.
Regards.