javascript - 剑道ui删除数字过滤器微调器
问题描述
到目前为止,我已经尝试了几种没有帮助的解决方案
{
field: "TotalEnergyCharge",
title: "Calc Total",
format: "{0:n2}",
width: "70px",
headerAttributes: {
style: "overflow: visible; white-space: normal; text-align: center; font-weight: bold"
},
attributes: {
style: "text-align: right"
},
operator: "eq",
filterable: {
cell: {
operator: "eq",
showOperators: false
}
},
spinners: false,
editor: function (container, options) {
$('<input data-bind="value:' + options.field + '"/>')
.appendTo(container)
.kendoNumericTextBox({
spinners: false
});
}
},
解决方案
您无法删除,因为您尝试的两种方式都意味着以不同的方式工作。spinners
之前editor
根本不起作用,并且spinners
位于内部的小部件的选项仅editor
在用户编辑一行时才起作用。
现在,对于过滤器小部件,我找不到任何可以直接使用的东西,例如editor
. 过滤器似乎没有类似的东西。
所以我在网格初始化后做了一个技巧,改变了过滤器的字段选项:
$('#grid .k-filter-row input[data-role="numerictextbox"]').each((i, el) => {
$(el).data('kendoNumericTextBox').setOptions({ spinners: false });
});
修改选择器以获取您想要删除微调器的过滤器。
请注意,setOptions
在 NumericTextBox 文档中未将其列为方法。为剑道点赞!!
推荐阅读
- sql-server - SSIS 脚本组件 - 获取数据流中的原始行数据
- java - 使用robot.keyPress 输入随机字符的循环
- sql - 从时间序列数据中过滤与特定条件匹配的记录的 SQL
- r - 提取包含特定单词的列
- email - SPF 身份验证失败
- google-cloud-platform - “Android 设备验证”服务配额使用情况
- python - 验证列表的长度并在必要时添加输入
- swift - 永远不会调用 TextField onCommit
- android-room - 将 Room 与 LiveData 一起使用时如何处理异常
- c# - 如何用空格字符替换没有数字字符?