11 Answers, 1 is accepted
0
Hello Bob,
You can set format on the filterable on the column like this:
field:
"YourField"
,
filterable: {
ui:
function
(element) {
element.kendoNumericTextBox({
format:
"n0"
});
}
}
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Bob
Top achievements
Rank 1
answered on 14 Apr 2015, 12:56 PM
Kiril, thanks for reply, but can you provide the syntax for the server-side wrapper?
0
Hello Bob,
It is practically the same:
.Filterable(f => f.UI(
"myfilter"
));
<script>
function
myfilter(element) {
element.kendoNumericTextBox({
format:
"n0"
});
}
</script>
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Bob
Top achievements
Rank 1
answered on 15 Apr 2015, 03:14 PM
This doesn't work as-is when using the filter row. I was able to verify in the Kendo UI Dojo. It seemed to work fine for the default filter type though. Any suggestions?
0
Hello Bob,
It will not work for the filter row. If you are using the filter row then use the following approach:
Regards,Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Bob
Top achievements
Rank 1
answered on 17 Apr 2015, 06:54 PM
And how do I do this for the paid product (server side)?
0
Accepted
Hello Bob,
It is practically the same:
columns.Bound(p => p.Freight).Width(250).Filterable(ftb => ftb.Cell(cell => cell.Operator("gte").Template("foo")))
Where "foo" is the function, behind the template.
Regards,
Kiril NikolovTelerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Bob
Top achievements
Rank 1
answered on 21 Apr 2015, 01:33 PM
If anyone is interested, here's what the filter function I made looks like:
function gridFilterIntegerNumericTextbox(args) {
args.element.kendoNumericTextBox({
format: "n0",
decimals: 0,
});
}
0
Deepti
Top achievements
Rank 1
Veteran
answered on 21 Jul 2020, 08:23 AM
Could you please share the complete code snippet that how you have used it?
0
0
Bermuda
Top achievements
Rank 1
Iron
Iron
answered on 03 Jun 2024, 06:28 PM
Hi - Hope this code example helps someone in the future.
//Kendo Grid
columns.Bound(p => p.Id).Title("ID").Filterable(f => f.UI("onIntFilter"));
<script>
function onIntFilter(e) {
e.element.kendoNumericTextBox({
format: "n0",
decimals: 0,
});
}
</script>