I want to custom pagination using datatable with angularjs mvc c#. i know inbuilt feature is avilable for pagination but don't used it.want to create custom so how can do that i don't know.
here this code for list my user list:
$scope.dtColumns = [
DTColumnBuilder.newColumn("fullName", "Full Name"),
DTColumnBuilder.newColumn("email", "Email"),
]
$scope.dtOptions = DTOptionsBuilder.newOptions().withOption('ajax', {
url: "/api/User/UserList",
type: "GET",
contentType: "application/json; charset=utf-8",
})
.withPaginationType('full_numbers')
.withDisplayLength(50)
.withOption('paging', false)
here my html code :
<table id="userList" datatable="" dt-options="dtOptions" dt-columns="dtColumns"> </table>
this my api method:
[HttpGet]
[Route("UserList")]
public IHttpActionResult UserList() {
Users = db.Users.ToList();
return Json(Users);
}
any one know how can do that then please let me know.