Hi Sergio,
Thank you for your interest in Syncfusion products.
In our earlier version, we have used GridPropertiesModel for Paging/Sorting. But in latest version 9.1 ,we can achieve the Paging/Sorting using GridBuilder. However We have prepared the sample for Grid Paging/Sorting using both GridPropertiesModel and GridBuilder. Please find the sample from the attachment.
1.Paging using GridPropertiesModel:
we can achieve the Paging/Sorting using GridPropertiesModel.Please refer the below code snippets.
[Controller]
public ActionResult FlatGrid( )
{
GridPropertiesModel
gridModel = new GridPropertiesModel()
{
DataSource = new NorthwindDataContext().Orders,
AllowPaging=true,
AllowSorting=true,
Caption = "GridOrders"
};
ViewData["GridModel"] = gridModel;
return View(this.ViewData);
}
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult FlatGrid(PagingParams args)
{
var data = new NorthwindDataContext().Orders.ToList();
return data.GridActions();
}
2.Paging using GridBuilder:
we can achieve the Paging/Sorting by calling the post action method in controller. Please refer the below code snippets.
[Controller]
public ActionResult ServerPaging()
{
IEnumerable data = new NorthwindDataContext().Orders.ToList();
return View(data);
}
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult ServerPaging(PagingParams args)
{
IEnumerable data = new NorthwindDataContext().Orders.ToList();
return data.GridActions();
}
In ASPX page we have to call the EnablePaging/EnableSorting methods.
[ASPX]
<%=Html.Syncfusion().Grid("OrderGrid")
.Column(column => {
column.Add(p => p.UniversityCode).HeaderText("University Code");
column.Add(p => p.Title);
})
.EnablePaging()
.EnableSorting()
%>
Please let us know if you need further assistance.
Regards,
Eswari.S
Grid Paging_72b7692a.zip