How can I display all values in a Telerik GridViewCheckBoxColumn filter in a RadGridView?

StackOverflow https://stackoverflow.com/questions/14506656

質問

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