Hi,
We have recently changed some legacy code which was calling a WCF API to populate the grid and it was using serverside paging. We have to use the same serverside paging but with C# datasource. How can we achieve this?
This is how the code was before when it used an API:
dataSource: {
type: "odata",
transport: {
read: dataUrl,
dataType: "json"
},
schema: {
model: BillingModel,
data: function (data) {
return data["value"];
},
total: function (data) { return data['odata.count']; }
},
serverPaging: true,
serverFiltering: true,
serverSorting: true,
sort: { field: "EncounterDate", dir: "asc" }
}
This was changed to use the c# datasource now:
dataSource: {
schema: {
model: BillingModel,
}
}