gpt4 book ai didi

javascript - Kendo UI Grid 行过滤器,带有 bool 值下拉列表

转载 作者:行者123 更新时间:2023-11-29 19:28:45 26 4
gpt4 key购买 nike

过滤器基本上工作正常但是,

  • 选择似乎没有触发第一个选择
  • 每次重置过滤器时也会发生这种情况。

我现在已经弄了两天...

这里是 Fiddle

<script src="../content/shared/js/products.js"></script>

<div id="grid"></div>

<script>
$(document).ready(function() {
$("#grid").kendoGrid({
dataSource: {
data: products,
schema: {
model: {
fields: {
ProductName: { type: "string" },
Discontinued: { type: "boolean" }
}
}
},
pageSize: 20
},
height: 550,
scrollable: true,
sortable: true,
filterable: {
mode: "row"
},
pageable: {
input: true,
numeric: false
},
columns: [
{
field: "ProductName",
title: "Product Name",
filterable: {
cell: {
operator: "contains",
showOperators: false
}
}
}, {
field: "Discontinued", title: "Discontinued",
filterable: {
mode: "row",
cell: {
showOperators: false,
template: function (args) {
args.element.kendoDropDownList({
autoBind:false,
dataTextField: "text",
dataValueField: "value",
dataSource: new kendo.data.DataSource({
data: [{ text: "Yes", value: "true" },
{ text: "No", value: "false" }]
}),
index: 0,
optionLabel: {
text: "Filter",
value: ""
},
valuePrimitive: true

})
}
}
}
}
]
});
});
</script>

最佳答案

Kendo UI 2015 Q1 有很多错误,尤其是在自动完成、多选、下拉列表等下拉家庭小部件上。将你的剑道库更改为 2014 或以前的版本将使它工作正常,检查这个dojo

关于javascript - Kendo UI Grid 行过滤器,带有 bool 值下拉列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29482969/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com