Hi all,I am currently experiencing a problem with the WinTree component.
I implemented Drag/Drop as described in the related Sample (WinTree DragDrop) and used the UltraTree_DropHightLight_DrawFilter_Class.cs which I modified a little to suit our needs.
So far everything works fine and pleasant.
Now when dealing with DragDrop functionality it is required to expand a node when the Drag hovers over it. So I implemented the following lines in the load event:
tree.AutoDragExpandDelay = 500;tree.Override.AllowAutoDragExpand = AllowAutoDragExpand.ExpandOnDragHover;
I have chosen the ExpandOnHover option because the nodes of a node are only populated when the node is expanded the first time.
I expected that the node is expanded after 500 ms firing the BeforeExpand event so that I can evaluate the childnodes and add them.Unfortunately this does not seem to happen. The node I hover above always stays closed.
What am I doing wrong here... any help is kindly appreciated.
best regardsAndy
Hello,
I think that you should populate the nodes with one level deeper. I mean, when you populate nodes for level 0, you should populate and also the child nodes for each node of level 0. If you expand some node from level 0 (level0Node), then you should populate the child nodes for each child node of level 1 (this is child node of level0Node) and etc.
Let me know if you have any further questions.
Hi Hristo,thanks for your answer.
I could propably do that, but there have been reasons for actually choosing the current approach.Subnodes might change during runtime, so when a folder is expanded I can read the new data and create the related nodes for it.
Evaluating the next level already denies this option for the level I am interested in (the one to be expanded).
I really assumed that using ExpandOnDragHover option actually expands the node currently hovered. This should (at least in my opinion) fire the BeforeExpand event of the node.
So not fireing the BeforeExpand event before actually expanding something (regardless why it is expanded or by whom) would look like a bug to me, what do you think?
Can you confirm that this event isn't fired in the case of hovering in a dragdrop operation?
looking foreward to your feedback and have a great weekend,best regardsAndy