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

Shift-key being ignored when ctrl-key held in either multi- or extended- selection mode. What am I doing wrong?

3 Answers 88 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 29 Apr 2013, 02:36 PM
I'm having issues with multi-selection of my treeview and I'm wondering what I'm doing wrong. I'm trying to get multi-select to work the way I expect on the RadTreeView, however I've found that every time I hold the ctrl key and shift key simultaneously, it seems to ignore the shift key and acts only in the normal ctrl key selection mode (where it selects only the item being clicked, rather than being able to click on an item with the ctrl key, then a second item with ctrl shift and select the new block, leaving any existing selection alone). Normal shift-select works as expected, and normal ctrl-select works just fine too, but ctrl-shift select just seems to work no differently than plain ctrl select, so like its ignoring the shfit key in that circumstance.

If you've read my post history, you may have read that I was trying to override default treeview selection behavior previously, but thankfully the project specification changed to just do the default windows treeview selection style, so I removed all previous overrides of event handlers I had in place and I'm just trying to use extended selection mode.

My xaml:

<UserControl x:Class="LasX.ApplicationFramework.Cad.EntityTreeView"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="TreeViewTemplates.xaml" />               
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <telerik:RadTreeView Name="treeView1"
                     HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                     telerik:TreeViewPanel.IsVirtualizing="True"
                     telerik:TreeViewPanel.VirtualizationMode="Recycling"
                     ItemTemplate="{StaticResource EntityDataTemplate}"
                     ItemsSource="{Binding CadEntityManager, UpdateSourceTrigger=PropertyChanged}"
                     ItemContainerStyle="{StaticResource RadTreeViewItemStyle1}"
                     Background="#FF212830"
                     SelectionChanged="treeView1_SelectionChanged"
                     SelectionMode="Extended"
                      >
        </telerik:RadTreeView>
    </Grid>
</UserControl>

Any clues as to what I may be doing wrong?

Thanks!

3 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 02 May 2013, 12:32 PM
Hello Robert,

You're not doing anything wrong. Unfortunately this feature isn't implemented in the RadTreeView and therefore we logged it as a feature request in our PITS. You can vote for the item in order to increase its priority and if the item gathers enough popularity, we'll definitely consider implementing it.

In any case, I hope that this is not a showstopper for you.

Kind regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Robert
Top achievements
Rank 1
answered on 02 May 2013, 03:44 PM
Thanks Tina,

While the answer is a little disappointing, its not a showstopper for us. In the meantime I'll just have to implement my own multi-select support by using the PreviewMouseDown event  and check to see if the shift and control keys are being held, then setting e.handled = true and handle selection manually in my code in that case.

Thanks
-Robert
0
Tina Stancheva
Telerik team
answered on 03 May 2013, 02:20 PM
Hello Robert,

I'm glad to hear that this feature isn't a showstopper. And please don't hesitate to write back if you need any assistance while implementing your customizations.

Kind regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TreeView
Asked by
Robert
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Robert
Top achievements
Rank 1
Share this question
or