paging server side does not work
paging server side does not work
i have:
in js:
$('#gridResults').dataTable({
"processing": true,
"serverSide": true,
"scrollY": "300px",
"scrollCollapse": true,
"bDestroy": true,
"sPaginationType": "full_numbers",
"ajax": {
'type': 'GET',
'url': urlBase + "api/SystemUser/GetList",
'pages': 10,
'data': request
},
"aoColumns": [
{
"sTitle": "SystemUserID", "mData": "SystemUserID", "bSearchable": false, "bSortable": false
},
{ "sTitle": "Full Name", "mData": "FullName", "bSearchable": false, "bSortable": true },
{ "sTitle": "Login Name", "mData": "LoginName", "bSearchable": false, "bSortable": true },
{ "sTitle": "Email", "mData": "Email", "bSearchable": false, "bSortable": true }
],
"columnDefs": [
{
"targets": 0,
"visible": false,
"searchable": false
}
]
});
in my web api
[HttpGet]
public dynamic GetList([FromUri] BEUserSearchRequest request)
{
BLSystemUser oBL = new BLSystemUser();
List<BESystemUser> oList = new List<BESystemUser>();
oList = oBL.GetList(request.SystemUser, request.PaginAttributes.PageNumber, request.PaginAttributes.PageSize);
var model = new
{
sEcho = request.PaginAttributes.PageNumber,
iTotalRecords = oList.Count(),
iTotalDisplayRecords = oList.Count(),
aaData = oList
};
return model;
}
Please, I need help
Thanks