我的應用程序中有劍道網格,並且它具有可過濾的「真實」。當我們應用過濾時,網格項目被過濾,網格大小也重新調整大小。當我們清除過濾器欄中的文本,然後自動網格顯示頁面加載中顯示的項目,而不用按清除按鈕。這可能嗎?我的網格碼是清除過濾出來單擊清除按鈕
var grid = $("#grid").kendoGrid({
dataSource: {
type : "odata",
transport : {
read: "http://demos.kendoui.com/service/Northwind.svc/Orders"
},
schema : {
model: {
fields: {
OrderID : { type: "number" },
Freight : { type: "number" },
ShipName : { type: "string" },
OrderDate: { type: "date" },
ShipCity : { type: "string" }
}
}
},
pageSize : 10
},
filterable: true,
sortable : true,
pageable : true,
columns : [
{
field : "OrderID",
filterable: false
},
"Freight",
{
field : "OrderDate",
title : "Order Date",
width : 100,
format: "{0:MM/dd/yyyy}"
},
{
field: "ShipName",
title: "Ship Name",
width: 200
},
{
field: "ShipCity",
title: "Ship City"
}
]
}).data("kendoGrid");
感謝您的快速回復,我試過那個,但我沒有得到任何結果。這裏是小提琴http://jsfiddle.net/SZBrt/17/。 – user2138545 2013-03-13 09:55:34
您的jsfiddle中存在JavaScript錯誤。這是它不工作的原因。 – 2013-03-13 11:28:16
你的過濾條件是什麼'val'?你想做什麼? – OnaBai 2013-03-13 11:44:10