This question is locked. New answers and comments are not allowed.
Hi Telerik,
I have a grid that displays a decimal? type property called Quantity
which is formatted to string based on another boolean property AllowDecimal.
I use an extended String property FormattedQuantity with the ff logic.
if (AllowDecimal)
return string.Format("{0:0.000}", value);
else
return string.Format("{0:0}", value);
I also use a Textbox in the ColumnCellTemplate to display the converted string.
But to enable number/decimal filtering (not string filtering) such as
...
e.g. Quantity Column displays
And when I try to filter, the numbers displayed are not formatted (see attached image)
e.g.
Question:
How is it possible for the filter popup to display the formatted value based on a condition while binding the decimal property?
e.g.
Thanks
I have a grid that displays a decimal? type property called Quantity
which is formatted to string based on another boolean property AllowDecimal.
I use an extended String property FormattedQuantity with the ff logic.
if (AllowDecimal)
return string.Format("{0:0.000}", value);
else
return string.Format("{0:0}", value);
I also use a Textbox in the ColumnCellTemplate to display the converted string.
But to enable number/decimal filtering (not string filtering) such as
- "Is not equal to"
- "Is less than"
- "Is greater than"
- etc.
...
<telerik:GridViewDataColumn Header="Qty" DataMemberBinding="{Binding Quantity}"/><telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding FormattedQuantity}" TextAlignment="Right"/>
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
...<telerik:GridViewDataColumn >
e.g. Quantity Column displays
- 3.432
- 6
And when I try to filter, the numbers displayed are not formatted (see attached image)
e.g.
- 3.432000
- 6.000000
Question:
How is it possible for the filter popup to display the formatted value based on a condition while binding the decimal property?
e.g.
- 3.432
- 6
Thanks