ページング機能を有効にしたデータを表示する剣道グリッドがあります。ナビゲーションボタンをクリックすると剣道グリッドのデータが消えます
ページ番号ボタンをクリックするとデータが表示されますが、ナビゲーションボタン(次、前、最初、最後)をクリックすると、グリッドは空きレコードなしのメッセージになります。
以下のスニペットは、私のグリッドコードです:resizeGrid機能について
function BindTranscript(ObjectData) {
$("#grid").kendoGrid({
noRecords: true,
dataSource: {
data: ObjectData,
pageSize: 20,
schema: {
model: {
fields: {
Heading: { type: "string", editable: false, nullable: true },
date: { type: "string", editable: false, nullable: true },
person: { type: "string", editable: false, nullable: true },
Visitor: { type: "string", editable: false, nullable: true },
Category: { type: "string", editable: false, nullable: true },
details: { type: "string", editable: false, nullable: true }
}
}
},
},
// height: 550,
// groupable: true,
sortable: true,
pageable: true,
dataBound: resizeGrid,
scrollable: true,
sortable: true,
columns: [{
template: "<div class='icon'>" +
"<span class='k-icon k-i-data'></span></div> #: heading #",
field: "heading",
title: "heading",
width: 240
}, {
field: "date",
title: "Date"
},
{
field: "person",
title: "person"
},
{
field: "Visitor",
title: "Visitor"
},
{
template: "<div class='category other'>" +
"<div class='cat-name'>#: Category #</div></div>",
field: "Category",
title: "Category"
},
{
field: "details",
title: "details"
}],
});
}
コードスニペット:
function resizeGrid() {
var gridElement = $("#datagrid"),
dataArea = gridElement.find(".k-grid-content"),
gridHeight = gridElement.innerHeight(),
otherElements = gridElement.children().not(".k-grid-content"),
otherElementsHeight = 0;
otherElements.each(function() {
otherElementsHeight += $(this).outerHeight();
});
dataArea.height(gridHeight - otherElementsHeight);
}
コンソールウィンドウにエラーがありますか? – Sandman
いいえ、エラーがないので、私はスタックオーバーフローでこれをポストしなければなりませんでした。グリッドには、ナビゲーションボタン以外のすべてが完璧に(ページ番号ボタンまで)完全に細かく設定されています。 – IntelligentCancer
問題を再現するための印刷画面または実行可能な例(Dojo)がありますか? – Sandman