Change drag item text

4 posts, 1 answers
  1. Ryan Black
    Ryan Black avatar
    54 posts
    Member since:
    Mar 2010

    Posted 16 Feb 2011 Link to this post

    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
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 18 Feb 2011 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Ryan Black
    Ryan Black avatar
    54 posts
    Member since:
    Mar 2010

    Posted 18 Feb 2011 Link to this post

    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.
  5. Answer
    Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 23 Feb 2011 Link to this post

    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!
Back to Top