Domanda

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

È stato utile?

Soluzione

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};
        }
    }
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top