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