Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
148233 | Oct 10,2019 06:21 PM UTC | Oct 11,2019 11:00 AM UTC | WPF | 1 |
![]() |
Tags: SfDataGrid |
<syncfusion:GridCheckBoxColumn.FilterPopupStyle>
<Style TargetType="syncfusion:GridFilterControl">
<Setter Property="CheckboxFilterStyle">
<Setter.Value>
<StyleTargetType="syncfusion:CheckboxFilterControl">
<Setter Property="Background"Value="Red"/>
<Setter Property="ItemTemplate">
<Setter.Value>
<DataTemplate>
<CheckBox Margin="4"
HorizontalAlignment="Stretch"
HorizontalContentAlignment="Stretch"
Focusable="False"
Content="{Binding Converter={StaticResource boolConverter}}"
FontWeight="{Binding FontWeight,RelativeSource={RelativeSource Self}}"
Foreground="{Binding Foreground,RelativeSource={RelativeSource Self}}"
IsChecked="{Binding IsSelected,
Mode=TwoWay}">
</CheckBox>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
</Style>
</syncfusion:GridCheckBoxColumn.FilterPopupStyle>
public class BoolConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if ((value as FilterElement).DisplayText == "True")
return "Yes";
else
return "No";
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return null;
}
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.