When using a Silverlight GridViewCheckBoxColumn the filter displays only the distinct values of all currently viewed items (the whole grid is paginated). So if all items happen to have the value set to "false" the filter will only display "false". How can I change it so that both "false" and "true" are displayed?

The XAML for the column is:

<telerik:GridViewCheckBoxColumn 
         x:Name="processingFailureColumn"
         Header="{Binding ApplicationStrings.ProcessingFailure, Source={StaticResource ResourceWrapper}}"
         DataMemberBinding="{Binding IsErroneous}">

And the result looks like:

enter image description here

有帮助吗?

解决方案

I solved the problem by manually supplying the distinct values in the DistinctValuesLoading event of the RadGridView.

private void DatagridArchivesOnDistinctValuesLoading(object sender, GridViewDistinctValuesLoadingEventArgs e)
    {
        if (e.Column.UniqueName == "processingFailureColumn")
        {
            e.ItemsSource = new List<bool> {true, false};
        }
    }
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top