Radtreeview, the drop event doesnt fire, only the previewdrop event

3 posts, 1 answers
  1. Annett
    Annett avatar
    24 posts
    Member since:
    Sep 2011

    Posted 20 Sep 2011 Link to this post

    Hi,

    i have a radtreeview filled with hierarchicaldata. In code i do the settings.

                _radTreeView = projectTreeView._xTreeView;
                _radTreeView.AllowDrop = true;

                _radTreeView.Drop += TreeViewDrop;
                _radTreeView.PreviewDrop += TreeViewPreviewDrop;
                _radTreeView.DragOver += ....


    If i drop an item the dropevent doesnt fire. Temporarily i solved this and work with the previewdropevent. But i dont like this solution. Have anyone ideas where my problem is? Some points that i must check?

    Thanks
    Annett
  2. Answer
    Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 21 Sep 2011 Link to this post

    Hello Annett,

    The RadTreeView actually uses and handles the Drag Drop events. Still they can be used for managing the drag and drop process, too. You should use the AddHandler() method of the TreeView with the handledEventsToo parameter set to 'true'. 

    public void AddHandler( RoutedEvent routedEvent, Delegate handler, boolhandledEventsToo );

    In the API Reference you can see that the Drop event is inherited from System.Windows.UIElement


    Greetings,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Annett
    Annett avatar
    24 posts
    Member since:
    Sep 2011

    Posted 21 Sep 2011 Link to this post

    Hello Didie,

    thanks, it works great. I am happy. Thank you.

    Annett
Back to Top