Node Selection on Mouse Up

4 posts, 0 answers
  1. Hunter
    Hunter avatar
    44 posts
    Member since:
    Aug 2012

    Posted 27 Jun 2014 Link to this post

    My goal is to drag a selected tree view node, with the ctrl key pressed, to perform an alternate drop. My issue is that when the ctrl key is held down, prior to clicking a selected node, that node is deselected on the mouse down event. When this happens my dragged payload is bound to an empty collection of selected items. I decided to compare this behavior with the solution explorer in VS and found that VS toggles the selection on mouse up, not down. So my question is, can I alter the tree view to select a node on mouse up? Is there a different way to reference this now deselected item?

    My tree view's selection mode is set to multiple and I am setting the payload of the item via the DragInitialize event within an attached behavior (below). 

    var data = (sender as RadTreeView).SelectedItems;


    Thanks!
  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 01 Jul 2014 Link to this post

    Hello Hunter,

    We are aware that the selection in the RadTreeView control is not consistent with the native one. This is why we have already logged an item in our system to fix that behavior. Unfortunately, with the current implementation of the control there is not an easy way to change its selection logic. Please accept our apology for any inconvenience caused.

    However, for your convenience I exposed an item in our feedback portal. You can follow it in order to be notified whenever we change its status.
    Also, please give your vote for it as the number of the votes are the factor that we evaluate when we consider the implementation of our items. If this item collects enough votes we will rise its priority. 

    Thank you for understanding.

    Regards,
    Pavel R. Pavlov
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Hunter
    Hunter avatar
    44 posts
    Member since:
    Aug 2012

    Posted 01 Jul 2014 in reply to Pavel R. Pavlov Link to this post

    Thank you for the reply! I noticed that this is only an issue if a single item was previously selected. Back to the drawing board I found a workaround in one of your examples for drag & drop behavior. What I found was that I can retrieve the deselected item via the event args "OriginalSource" property. You can check to see if this is a RadTreeViewItem and access the item's data context, success. Though I have found a workaround I would still like to see the selection occur on mouse up and I have voted for this in the link you provided.

    Thank you again.
  5. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 02 Jul 2014 Link to this post

    Hi Hunter,

    I am happy to hear that you have found a workaround in your particular case. We will carefully follow the demand of that feature and if it goes higher, we will estimate its implementation.

    Thank you for your vote. It is important for us.

    Regards,
    Pavel R. Pavlov
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top