Last Updated: 12 Nov 2019 13:45 by Petar
Created on: 01 Nov 2019 14:36
Category: TreeView
Type: Bug Report
TreeView: Extended selection does not work correctly with the UI Virtualization enabled when there is a large number of items selected on the first level

When a large number of items are selected through extended selection (with a lot of items on the first level of the RadTreeView) the selection does not work correctly. 

Workaround - make the selection in viewmodels manually and provide 2way bindings in style
                <Style TargetType="telerik:RadTreeViewItem">
                    <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
                    <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
private void SomeRadTreeView_SelectionChanged(object sender, SelectionChangedEventArgs e)
            int count = e.AddedItems.Count;
            if (count > 1)
                SomeViewModel first = e.AddedItems[0] as SomeViewModel;
                SomeViewModel last = e.AddedItems[count - 1] as SomeViewModel;
                this.SomeRadTreeView.SelectionChanged -= this.SomeRadTreeView_SelectionChanged;
                this.SomeRadTreeView.AutoScrollToSelectedItem = false;
                this.ViewModel.SelectRange(first, last);
                this.SomeRadTreeView.AutoScrollToSelectedItem = true;
                this.SomeRadTreeView.SelectionChanged += this.SomeRadTreeView_SelectionChanged;

1 comment
Posted on: 12 Nov 2019 13:45
We are declining this item because there is already a logged item with the same root origin: