如何更改剑道网格过滤器格式 [英] How to change Kendo Grid Filter Format

查看:31
本文介绍了如何更改剑道网格过滤器格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网格中有一个字段,其 ID 范围为 1 到 2000.我在字段定义中将其指定为一个数字.

I have a field in my grid that are IDs that range from 1 to 2000. I have it designated as a number in the field definition.

问题是当我使用过滤器并输入1000"时,当我返回过滤器输入另一个数字时,它会显示1,000.00".我不希望过滤后的文本框显示逗号或小数点.该格式与该字段无关.

The issue is when I use the filter and type in say "1000" when I return to the filter to put in another number it displays "1,000.00". I don't want the filtered text box to show the comma or decimal point. That format isn't relevant for this field.

我该如何纠正?

提前致谢!

推荐答案

虽然@Flores 的回答为我指明了正确的方向,但它并没有达到预期的效果.至少我的过滤器中仍然有逗号使用他的片段.我最终对代码进行了小幅修改以达到预期的效果.

While @Flores answer pointed me in the right direction, it did not do what was expected. At least I still had commas in my filter using his snippet. I ended up making a small modification to the code to achieve the desired result.

filterable: {
    ui: function (element) {
        element.kendoNumericTextBox({
            format: '#',
            decimals: 0,
        });
    },
},

那只会给你数字.没有逗号和小数.

That will give you only numbers. No commas and no decimals.

这篇关于如何更改剑道网格过滤器格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆