New to Telerik UI for WPF? Download free 30-day trial

Distinct Values Work Only the First Time in RadGridView

Environment

Product Version 2023.3.1114
Product RadGridView for WPF

Description

The filters in the RadGridView control work only the first time that they are created.

This behavior can occur when a custom ControlTemplate is applied to the Template property of FilteringControl element with a product version equal to or higher than 2022.2.511. The cause for it is an update to the Path property's value of the Binding instance for the ItemsSource property of the ListBox control, which displays the distinct values.

Solution

To prevent this behavior from occurring, in the ControlTemplate, set the Path property of the Binding instance for the ItemsSource property to FilteredDistinctValues. The outdated value was DistinctValues. The ListBox element has an x:Name="PART_DistinctValuesList".

Modifying the Path property of the ItemsSource Binding instance

<ListBox x:Name="PART_DistinctValuesList" 
        ItemsSource="{Binding FilteredDistinctValues}"> 
</ListBox> 
To ensure that everything works properly, it is recommended to replace the customized ControlTemplate with the original one from the latest Telerik version. Then you can re-apply any customizaions in the new template.
In this article