在下面的代码中,我得到了列标题,但我没有得到自动文本框来过滤每一列下面的数据,这个属性在 kendo grid filterable:{ mode: "row"} 中被调用,但是我在下面添加了这个属性结果还没来。但是我在 MVC 中运行的相同代码运行良好,请帮助我。
grid = $("#gridAllPayers").data("kendoGrid");
var gridHeight = $(window).height() - 220;
var configuration = {
columns: getheaderswithcolumns(),
resizable: true,
columnMenu: true,
reorderable: true,
height: gridHeight,
filterable: {
mode: "row"
},
navigatable: true,
sortable: true,
pageable: {
input: true,
numeric: true
}
};
var Feedback = $("#gridAllPayers").kendoGrid(configuration).data("kendoGrid");
}
function getheaderswithcolumns() {
var cols = new Array();
cols.push(
{
field: "PayerName", title: "Insurance Name", headerAttributes: { "class": "table-header-cell", style: "text-align:center;font-size: 13px" },
width: 220, attributes: { style: "text-align:left;" },
},
{
field: "PayerPlan", title: "Plan Name", headerAttributes: { "class": "Test", style: "text-align: left; font-size: 13px" }, width: 220,
attributes: { style: "text-align:left;" },
},
{
field: "State", title: "Insurance's State", headerAttributes: { "class": "table-header-cell", style: "text-align: left; font-size: 13px" }, width: 200,
attributes: { style: "text-align:left;" },
},
{
field: "ClaimStatusPhoneNumber", title: "Claim Status #", headerAttributes: { "class": "table-header-cell", style: " font-size: 13px" }, width: 200,
attributes: { style: "text-align:left;" },
},
{
field: "ClaimMailingAddress", title: "Claim's Mailing Address", headerAttributes: { "class": "table-header-cell", style: "font-size: 11px" }, width: 300,
}
)
return cols;
}
<link href="kendoui/kendo.dataviz.default.css" rel="stylesheet" />
<link href="kendoui/kendo.default.min.css" rel="stylesheet" />
<link href="kendoui/kendo.common.min.css" rel="stylesheet" />
<link href="kendoui/kendo.dataviz.default.css" rel="stylesheet" />
<script type="text/javascript" src="content/js/kendo.all.min.js"></script>
<div id="gridAllPayers">
</div>