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

Node Selection on Mouse Up

3 Answers 207 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Hunter
Top achievements
Rank 1
Hunter asked on 27 Jun 2014, 08:37 PM
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!

3 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 01 Jul 2014, 08:44 AM
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.
 
0
Hunter
Top achievements
Rank 1
answered on 01 Jul 2014, 06:07 PM
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.
0
Pavel R. Pavlov
Telerik team
answered on 02 Jul 2014, 10:36 AM
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.
 
Tags
TreeView
Asked by
Hunter
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Hunter
Top achievements
Rank 1
Share this question
or