This is a migrated thread and some comments may be shown as answers.

[Solved] Disable auto expand on drag over?

2 Answers 100 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Radovan Radic
Top achievements
Rank 1
Radovan Radic asked on 16 Oct 2009, 07:48 AM
Hi,

Is there a way to disable node expanding when drag is over the node? I have read somewhere that this is by default, and it seems you wanted to implement this to have windows like feature. But, I need to be able to disable this. Is there some workaround for this on client side?

Another issue related to dragging. When list of nodes is long and I need to drop node at the bottome of the treeview which is not displayed on the screen, auto-scroll does not work. It does not work on IE or Firefox. This can be achieved by using mouse scrolling wheel, but this is something our clients wont like.

Thanks,
Radovan

2 Answers, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 19 Oct 2009, 06:23 PM
I'm not sure if this event gets called when you drag an item but you could take a look at the OnclientNodeExpanding event. You could set up a conditional statement to cancel the event if you are dragging a node.
0
Radovan Radic
Top achievements
Rank 1
answered on 22 Oct 2009, 03:20 PM
Hi Schlurk,

Thanks for the idea, this way it works as I wanted:

function ClientNodeExpanding(sender, eventArgs) {  
           if (sender._dragging) {  
                   eventArgs.set_cancel(true);  
           }  


Radovan
Tags
TreeView
Asked by
Radovan Radic
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Radovan Radic
Top achievements
Rank 1
Share this question
or