ver video:
Él código de la plantilla es el siguiente:
$(document).ready(function(){
GetSearh();
});
function GetSearh() {
var oParameter = {};
$("#grid%tablename%").kendoGrid({
type: "json",
resizable: true,
selectable: true,
sortable: true,
pageable: {
pageSizes: [10, 25, 50, 100]
},
dataSource: {
serverPaging: true,
serverSorting: false,
pageSize: 10,
height: '300px',
width: '1200',
transport: {
read: {
url: '%tablename%/Get%tablename%Paged',
contentType: 'application/json; charset=utf-8',
type: "GET",
dataType: "json"
},
parameterMap: function (options) {
oParameter.PageNumber = options.page;
oParameter.PageSize = options.pageSize;
return oParameter;
}
},
schema: {
data: function (result) {
return result;
},
total: function (result) {
if (result!= undefined) {
return result[0].VirtualCount;
}
}
}
},
columns: [
for%
{ field: "%columnname%", title: "%columnname%", width: 10 },
%for
]
});
}