Hello,
I try to filter a double and it seems to not working.. Could you help me :-)
I create a small sample for you:
XAML:
<syncfusion:SfDataGrid x:Name="testGrid" AllowFiltering="True">
<syncfusion:SfDataGrid.Columns>
<syncfusion:GridTemplateColumn HeaderText="Test"
MappingName="DoubleValue"
AllowEditing="False">
<syncfusion:GridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding DoubleValue}" ></TextBlock>
</DataTemplate>
</syncfusion:GridTemplateColumn.CellTemplate>
</syncfusion:GridTemplateColumn>
</syncfusion:SfDataGrid.Columns>
</syncfusion:SfDataGrid>
Model:
public class ItemClass
{
public double? DoubleValue { get; set; }
}
Code Behind
this.testGrid.Columns["DoubleValue"].ColumnMemberType = typeof(double?);
this.testGrid.ItemsSource = new List<ItemClass>
{
new ItemClass{ DoubleValue = 0.9 },
new ItemClass{ DoubleValue = 1 },
new ItemClass{ DoubleValue = 1.1 },
new ItemClass{ DoubleValue = 1.2 },
new ItemClass{ DoubleValue = 1.3 },
new ItemClass{ DoubleValue = 1.4 },
};
1) I don't understand why the 1.09 value is not correct
2) Even if I Change the value to 1.1, the result is not correct.
Jimmy