gpt4 book ai didi

angularjs - 无法过滤剑道网格中的文本框

转载 作者:行者123 更新时间:2023-12-05 01:16:05 24 4
gpt4 key购买 nike

我是剑道网格的新手。下面的代码无法过滤出现在第二位的单词,例如:如果我开始在文本框中键入“Vins”,它会在下拉列表中正确预测并显示此“Vins et alcools Chevalier”,但如果我键入“et”之类的单词", "alcools"...它没有预测也没有显示在下拉列表中。

来源:http://dojo.telerik.com/UFozA

 <!DOCTYPE html>
<html>
<head>
<base href="http://demos.telerik.com/kendo-ui/grid/filter-row">
<style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style>
<title></title>
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2015.2.902/styles/kendo.common-material.min.css" />
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2015.2.902/styles/kendo.material.min.css" />

<script src="https://kendo.cdn.telerik.com/2015.2.902/js/jquery.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2015.2.902/js/kendo.all.min.js"></script>
</head>
<body>

<div id="example">
<div id="grid"></div>
<script>
$(document).ready(function() {
$("#grid").kendoGrid({
dataSource: {
type: "odata",
transport: {
read: "//demos.telerik.com/kendo-ui/service/Northwind.svc/Orders"
},
schema: {
model: {
fields: {
OrderID: { type: "number" },
Freight: { type: "number" },
ShipName: { type: "string" },
OrderDate: { type: "date" },
ShipCity: { type: "string" }
}
}
},
pageSize: 20,
serverPaging: true,
//filter: "contains",
serverFiltering: true,
},
height: 550,
filterable: {
mode: "row"
},
pageable: true,
filter: "contains",
columns:
[{
field: "OrderID",
width: 225,
filterable: {
cell: {
showOperators: false
}
}
},
{
field: "ShipName",
width: 500,
title: "Ship Name",
filterable: {
cell: {
operator: "contains"
}
}
},{
field: "Freight",
width: 255,
filterable: {
cell: {
operator: "gte"
}
}
},{
field: "OrderDate",
title: "Order Date",
format: "{0:MM/dd/yyyy}"
}]
});
});
</script>
</div>


</body>
</html>

最佳答案

试试这个:http://dojo.telerik.com/@smagistri/UGerE

您实际上需要添加:

cell: {
template: function (container) {
container.element.kendoAutoComplete({
filter: "contains",
//autoBind: false,
dataTextField: "ShipName",
dataValueField: "ShipName",
valuePrimitive: true,
dataSource: container.dataSource
});
},
showOperators: false
}

关于angularjs - 无法过滤剑道网格中的文本框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32363527/

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