A DataSource defined using TagHelpers with disabled serverPaging sets default pageSize:
<datasource type="DataSourceTagHelperType.Ajax" server-filtering="true" server-paging="false">
<transport>
<read url="@Url.Page("Index", "Read")" data="forgeryToken" />
</transport>
<schema data="Data">
<model id="OrderID">
<fields>
<field name="ShipName" type="string"></field>
</fields>
</model>
</schema>
</datasource>
generates the following initialization script:
{"dataSource":{"page":1,"pageSize":20,"schema":{"model":{"id":"OrderID","fields":{"ShipName":{"type":"string"}}},"data":"Data","errors":"Errors","total":"Total"},"serverAggregates":true,"serverFiltering":true,"serverGrouping":true,"serverPaging":true,"serverSorting":true,"transport":{"read":{"url":"/?handler=Read","data":forgeryToken}},"type":(function(){if(kendo.data.transports['aspnetmvc-ajax']){return 'aspnetmvc-ajax';} else{throw new Error('The kendo.aspnetmvc.min.js script is not included.');}})()}
with default pageSIze set.
Initializing using jQuery works as expected:
dataSource: {
type: "aspnetmvc-ajax",
serverPaging: false,
serverFiltering:true,
transport: {
read: {
url: "@Url.Page("Index", "Read")",
data: forgeryToken
}
},
schema: {
model: {
id:"OrderID"
},
data: "Data",
total:"Total"
}
}
The "page" and "pageSize" values are set, which results in only 20 items being displayed, even though more are returned by the "read" action.
The "page" and "pageSize" should not be set.