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

New Request

4 Answers 87 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Cuthahotha
Top achievements
Rank 1
Cuthahotha asked on 18 Sep 2008, 10:52 PM
I have a request for a new control.  But honestly I think my request could be easiily handled by the treeview control.

What I need is a list that I can drag and drop to change order of items with.  The list box control with a "MaxLevels" parameter would work great.

If I could limit the treeview to not allow for nesting it would be exactly what i need.

Thanks,
Steve

4 Answers, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 19 Sep 2008, 07:45 AM
Hi Steve,

you can do this very easy by using the PreviewDragEnded event and the following code in the event handler:
<telerikNavigation:RadTreeView PreviewDragEnded="RadTreeView1_PreviewDragEnded" IsDragDropEnabled="True" x:Name="RadTreeView1"


        private void RadTreeView1_PreviewDragEnded(object sender, Telerik.Windows.Controls.RadTreeViewDragEndedEventArgs e)  
        {  
            if (e.DropPosition == Telerik.Windows.Controls.DropPosition.Inside)  
            {  
                e.Handled = true;  
            }  
        } 

This will allow users to move the items, and will not allow the insert into items.


All the best,
Valentin.Stoychev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Cuthahotha
Top achievements
Rank 1
answered on 19 Sep 2008, 11:50 AM
Thanks Valentin,

Seeing the "Drop In" adorner and then not being able to execute a drop in would be very aggravating.

Does this code suppress the drop only, or will this also suppress the drag indication text "Drop In".  If it suppresses the text from showing up, perfect.  If not, can the "DropInText" be set to a null or empty string?

Thanks,
Steve
0
Valentin.Stoychev
Telerik team
answered on 19 Sep 2008, 01:02 PM
Hello Steve,

If you are able to wait for a week, you will be able to have the Drop in text skipped also. We will be converting the drag/drop mechanism of the TreeView to our new drag/drop framework and you will have much more control over this. We will release the new TreeView at the end of next week. Is this OK for you?

Best wishes,
Valentin.Stoychev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Cuthahotha
Top achievements
Rank 1
answered on 19 Sep 2008, 07:32 PM
Valentin,

it's outstanding, and yes i can wait.  Well it's actually ok, but if you guys are already 3 steps ahead of me all the time, i won't earn any Telerik points. :(

Just kidding.  looking forward to the next release,

Thanks,
Steve
Tags
General Discussions
Asked by
Cuthahotha
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
Cuthahotha
Top achievements
Rank 1
Share this question
or