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

Change drag item text

3 Answers 72 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Ryan Black
Top achievements
Rank 1
Ryan Black asked on 16 Feb 2011, 07:20 PM
I am trying to programmatically change the drag item text for items in my TreeView using the default style.  I know by default it is using the .ToString() method of an object to display.

Thanks
Ryan

3 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 18 Feb 2011, 03:03 PM
Hi Ryan Black,

You can examine a sample project showing how to create a custom DragCue dynamically. Basically, it uses the RadDragAndDropManager.DropInfo event. Please feel free to ask  if you need further assistance on this.

All the best,
Petar Mladenov
the Telerik team
0
Ryan Black
Top achievements
Rank 1
answered on 18 Feb 2011, 03:19 PM
Thanks for the detailed example.  That is close to what I want, however I want to use the default Telerik drag template and be able to set my custom drag item name.
0
Accepted
Petar Mladenov
Telerik team
answered on 23 Feb 2011, 02:31 PM
Hello Ryan Black,

It actually doesn't use the ToString Method. You can see in the first attached project that the Default dragcue finds the Name property in the ViewModel that is bound via DataTemplate.
On the other had, you can play with the default style of the TreeViewDragCue that you may find in the second project.
Feel free to ask if you need further assistance on this.

Kind regards,
Petar Mladenov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
TreeView
Asked by
Ryan Black
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Ryan Black
Top achievements
Rank 1
Share this question
or