vendredi 26 mai 2017

WPF Telerik RadGridView Filter not being applied for Checkboxes

I have a page with a RadGridView and some buttons for quickly filtering the RadGridView data.

When a user clicks one of the buttons, a FilterDescriptor is added to the view and the filter is applied. If a user clicks "Show New Items only", a filter is applied and new items will be shown.

This is working for all but my boolean checkbox columns. When the filter is applied, no matching items are found. I've tried a number of things, but nothing seems to work.

XAML

telerik:GridViewCheckBoxColumn UniqueName="CorrectiveActionRequired" Header="Corrective Action" IsReadOnly="False" IsEnabled="True" IsFilterable="True"
                                            DataMemberBinding="{Binding CorrectiveActionTaken, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
                                            AutoSelectOnEdit="True" EditTriggers="CellClick" />

C#

private void FilterByCorrectiveActionRequired(object sender, MouseButtonEventArgs e)
    {
        this.NearMissRadGridView.FilterDescriptors.Clear();
        FilterDescriptor descriptor = new FilterDescriptor();
        descriptor.Member = "CorrectiveActionRequired";
        descriptor.Operator = FilterOperator.IsEqualTo;
        descriptor.Value = true;
        this.NearMissRadGridView.FilterDescriptors.Add(descriptor);
    }




Aucun commentaire:

Enregistrer un commentaire