在启用分组和列菜单的情况下使用剑道网格时,我遇到了一个问题。
当我们选择任何一列进行分组时(比如 ShipCountry),折叠所有行,从列菜单中取消选择任何列(列的右上角)并展开行。取消选择的列在内部网格中可见,列名在标题中不可见。
我们甚至尝试处理列菜单的检查事件,手动显示或隐藏列,但没有成功。一些机构可以帮助解决这个问题。
下面是我的实现的代码片段。
<html>
<head>
<title></title>
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://cdn.kendostatic.com/2012.3.1315/js/kendo.all.min.js"></script>
<link href="http://cdn.kendostatic.com/2012.3.1315/styles/kendo.common.min.css" rel="stylesheet" />
<link href="http://cdn.kendostatic.com/2012.3.1315/styles/kendo.default.min.css" rel="stylesheet" />
</head>
<body>
<div id="example" class="k-content">
<div id="grid"></div>
<script>
$(document).ready(function() {
$("#grid").kendoGrid({
dataSource: {
type: "odata",
transport: {
read: "http://demos.kendoui.com/service/Northwind.svc/Orders"
},
schema: {
model: {
fields: {
OrderID: { type: "number" },
ShipCountry: { type: "string" },
ShipName: { type: "string" },
ShipAddress: { type: "string" }
}
}
},
pageSize: 10,
serverPaging: true,
serverFiltering: true,
serverSorting: true
},
height: 250,
sortable: true,
filterable: true,
columnMenu: true,
pageable: true,
groupable:true,
columns: [
"OrderID",
"ShipCountry",
"ShipName",
{
field: "ShipAddress",
filterable: false
}
]
});
});
</script>
</div>
</body>
</html>