Hi,
I would like to stop a node expanding while the mouse is hoovering a node while draging another node.
I've tried the following:
On my class which inherits from RadTreeNode:
public override void Expand()
{
// stop node expanding if dropping to it
if (this.TreeView.DraggedNode!=null || (this.TreeView.SelectedNode!=null && this.TreeView.SelectedNode!=this))
return;
...
The problem here is that the node will not expand if it is not selected, which is the case if i click on the expand icon which does not select the node.
private void deviceTree_Expanding(object sender, System.ComponentModel.CancelEventArgs e)
{
// I set the dragNode variable on the Dragging event of the treeview
if (dragNode != null)
e.Cancel = true;
}
The problem with this solution is that the event is triggered after Expand method of the node.
How can I accomplish this? my problem is that many nodes have large quantities of children and the tree is quite sensitive to which node to drop to, one has to move the mouse a little to choose the right node.
root
+ node1
+ node2
+ node3
+ node4
if I want to drop node4 on node2 it requires the user to move the mouse carefully, it could end up on node1, node2 or node3, but then node1 expands and i have to cancel the drop and start all over again. Is there a way to change this behaviour? that is expand while dropping OR at least increase the "onhoover" time before expanding.
Thanks,
/ jorge
I would like to stop a node expanding while the mouse is hoovering a node while draging another node.
I've tried the following:
On my class which inherits from RadTreeNode:
public override void Expand()
{
// stop node expanding if dropping to it
if (this.TreeView.DraggedNode!=null || (this.TreeView.SelectedNode!=null && this.TreeView.SelectedNode!=this))
return;
...
The problem here is that the node will not expand if it is not selected, which is the case if i click on the expand icon which does not select the node.
private void deviceTree_Expanding(object sender, System.ComponentModel.CancelEventArgs e)
{
// I set the dragNode variable on the Dragging event of the treeview
if (dragNode != null)
e.Cancel = true;
}
The problem with this solution is that the event is triggered after Expand method of the node.
How can I accomplish this? my problem is that many nodes have large quantities of children and the tree is quite sensitive to which node to drop to, one has to move the mouse a little to choose the right node.
root
+ node1
+ node2
+ node3
+ node4
if I want to drop node4 on node2 it requires the user to move the mouse carefully, it could end up on node1, node2 or node3, but then node1 expands and i have to cancel the drop and start all over again. Is there a way to change this behaviour? that is expand while dropping OR at least increase the "onhoover" time before expanding.
Thanks,
/ jorge