是否可以通过对以下内容进行修改来搜索“ Doe”和“ Smith”?有没有一种方法可以使搜索框接受两个值?
即Doe | Smith或Doe,Smith作为搜索字符串
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
columns: [
{ field: "name", filterable: { cell: { operator: "contains", showOperators: false } } },
{ field: "age", filterable: { cell: { operator: "contains", showOperators: false } } }
],
filterable: { mode: "row"},
dataSource: {
data: [
{ id: 1, name: "Jane Doe", age: 30 },
{ id: 2, name: "Jane Doe", age: 30 },
{ id: 3, name: "Bill Smith", age: 40 },
{ id: 4, name: "Tom Jones", age: 99 }
],
schema:{
model: {
id: "id",
fields: {
age: { type: "number"}
}
}
}
}
});
</script>
答案 0 :(得分:-1)
我不确定kendo网格的javascript声明,但是带有MVC声明,只需添加
container-fluid
您可以使用和<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<div class="container-fluid">
<div class="row">
<div class="col-4" style="background-color: red;"><br><br><br><br><br></div>
<div class="col-8" style="background-color: blue;"><br><br><br><br><br></div>
</div>
</div>
或.Filterable()
来过滤两个值。