我們正在使用Kendo網格。我在我的cshtml文件和我的js文件中創建了一個表,我將它綁定到數據。我的問題在於網格分頁不會消失。我需要頁面上的所有項目,因爲我們不期望有太多的負載。我嘗試刪除可分頁的屬性,我試圖標記pageable: false
。但我仍然看到網格在一個頁面中只顯示10個項目並給出分頁。如何在kendogrid上禁用分頁
通過使用this.pager.element.hide()
,我們可以隱藏尋呼機,但這並不能解決目的,因爲尋呼機是隱藏的,但分頁仍在完成。所以,現在,從第11個元素開始的元素位於該頁面的頁面上,但我們無法導航到它。
這裏是現有的代碼。我已經刪除了表中不相關的列。 .CSHTML文件:
<table style="width: 100%;" class='list-entity' id='inboxItems'>
<thead>
<tr>
<th data-field='Actions' class="iconCell" style='width: 1%'> </th>
<### THERE ARE MORE COLUMNS HERE AND THOSE HAVE CORRESPONDING COLUMNS IN SETTINGS ###>
</tr>
</thead>
</table>
JS文件:
var settings = {
kendosettings: {
dataSource: {
data: requestItemsList,
schema: {
// required if get method will be used
model: {
id: "StepApproverKey"
}
},
group: [
{
field: "GroupByAttribute",
dir: "asc",
aggregates:
[
{ field: "GroupByAttribute", aggregate: "count" }]
}]
},
sort: { field: "SubmittedOn", dir: "desc" },
sortable: true,
pageable: false,
scrollable: false,
columns: [
{
field: "Actions",
title: "Actions",
template: kendo.template($("#inboxrowEditTemplate").html())
},
{ field: "StepApproverKey", hidden: true },
{
field: "GroupByAttribute",
hidden: true,
groupHeaderTemplate: kendo.template($("#inboxrowgroupHeaderTemplate").html()),
headerAttributes: {
style: "width: 100%"
}
}
],
selectable: "row",
}
};
$('#inboxItems').pdi().displaygrid(settings);
你有沒有嘗試設置滾動爲真? – rafoo
是的。試過Scrollable True和False。我仍然看到分頁發生。 – Feroz