I have a Kendo Grid displaying dollar amounts but the data in the DataSource returns 4 decimal places.
The DataSource data looks something like this:
{ totalDollars: 1513.1548 },
{ totalDollars: 158.2903 },
{ ... }
So to display the number correctly I use the column format...
columns: [
{ field: 'totalDollars', format: '{0:c2}' },
{ ... }
]
But now I want to filter this column. If I filter with "Is Equal To"
159.29
it fails.
I've made it work using 4 decimals and using column.filterable.ui
:
columns: [
{
field: 'totalDollars',
format: '{0:c2}',
filterable: {
ui: function(e) {
element.kendoNumericTextBox({
format: "n4",
decimals: 4
});
}
}
}
]
But this doesn't help because the user doesn't know the last 2 decimals. So I need it to only use up to 2 decimals when filtering.
Is this possible?
JSFiddle here - note that filtering by "Mono Cost" using 7133.03
doesn't work but 7133.0332
does. I'm looking to make 7133.03
work.