I ran into this problem when experimenting with VirtualGrid, but trying to work with Multiple selection mode seems completely broken. I have even created a new project from scratch and only imported the following packages:
telerik.windows.controls.for.wpf.xaml (2024.3.924)
telerik.windows.controls.virtualgrid.for.wpf.xaml (2024.3.924)
My MainWindow.xaml looks like:
<Window x:Class="TestVirtGrid.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:TestVirtGrid"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<telerik:RadVirtualGrid x:Name="VirtGrid" CanUserEdit="False" Grid.Row="0" SelectionMode="Multiple" SelectionUnit="Row" />
<Button Grid.Row ="1" Content="amon"/>
</Grid>
</Window>
The code-behind looks like:
using System.Collections.ObjectModel;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Telerik.Windows.Controls.VirtualGrid;
namespace TestVirtGrid
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
ObservableCollection<Test> list = [];
for (int i = 0; i < 20; i++)
list.Add(new Test() { a = i, b = i });
VirtGrid.DataProvider = new DataProvider(list);
}
}
public class Test
{
public int a { get; set; }
public int b { get; set; }
}
}
When running the application, I'm able to select rows, but deselecting is clearly not working as intended. When I try to deselect, it often just completely fails to do so. Sometimes (like, 1 in 5 tries?) it does end up deselecting the row.
If there's something I've done wrong here, please let me know, otherwise I'd like to get some confirmation that this module doesn't work.