gpt4 book ai didi

javascript - JSGrid 不显示过滤器输入字段

转载 作者:行者123 更新时间:2023-11-28 19:25:57 27 4
gpt4 key购买 nike

我希望输入筛选字段按预期创建并显示在标题行单元格下方。

在我的 MVC 解决方案中,我通过 AJAX/JSON/GET 填充了 JSGrid。我能够排序并进入 loadData javascript 等。当我添加“filtering:true”时,标题行和表体行之间会生成一行包含单元格的行,但输入字段不存在。我尝试包含不同的 CSS、JQuery 和 JS 库,并尝试模仿许多演示和示例。

function RenderImportHistory() {
$("#jsGrid_ImportHistory").jsGrid({
width: "100%",
height: "572px",
pageSize: 10,
pageButtonCount: 5,

filtering: true,
editing: true,
sorting: true,
paging: true,
autoload: true,

loadIndication: true,
loadIndicationDelay: 500,
loadMessage: "Getting Import History ...",

controller: {
loadData: function (filter) {
var d = $.Deferred();
$.ajax({
url: "@Url.Action("GetImportHistory", "SCAL", new { Area = "Admin" })",
dataType: "json",
type: "GET"
}).done(function(result) {
/*result = $.grep(result, function(item) {
return item.patientId === filter.patientId
&& item.patientName === filter.patientName
&& item.genderId === filter.genderId
&& item.mobile === filter.mobile;

}); */
d.resolve(result);
});
return d.promise();
}
},
fields: [
{ name: "ID", type: "Number", css: "jsGrid_Body", headercss: "jsGrid_Head", width: 11, sorter:"number" },
{ name: "ImportSched_ID", type: "Number", title: "Schedule", css: "jsGrid_Body", headercss: "jsGrid_Head", width: 27, sorter:"number" },
{ name: "Created", type: "Text", title: "Started", css: "jsGrid_Body", headercss: "jsGrid_Head", itemTemplate: function (value) { return FormatDateTime(value); } },
{ name: "Completed", type: "Text", title: "Ended", css: "jsGrid_Body", headercss: "jsGrid_Head", itemTemplate: function (value) { return FormatDateTime(value); } },
{ name: "NumOfClaims", type: "Number", title: "Claims", css: "jsGrid_Body", headercss: "jsGrid_Head", width: 21, sorter: "number", itemTemplate: function (value) { return FormatCounts(value); } },
{ name: "NumOfRecords", type: "Number", title: "Rows", css: "jsGrid_Body", headercss: "jsGrid_Head", width: 21, sorter: "number", itemTemplate: function (value) { return FormatCounts(value); } },
{ name: "TimeToRead_Seconds", type: "Number", title: "Read", css: "jsGrid_Body", headercss: "jsGrid_Head", width: 21, sorter: "number", itemTemplate: function (value) { return FormatDuration(value); } },
{ name: "TimeToWrite_Seconds", type: "Number", title: "Wrote", css: "jsGrid_Body", headercss: "jsGrid_Head", width: 21, sorter: "number", itemTemplate: function (value) { return FormatDuration(value); } }
]
});
}

最佳答案

也许这个话题已经开了很久了。但我遇到了同样的问题,使用 heading: true 属性对我有用

关于javascript - JSGrid 不显示过滤器输入字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56192931/

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