We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Thread ID:





127695 Dec 2,2016 08:26 PM UTC Dec 5,2016 01:47 PM UTC ASP.NET MVC 1
Tags: Grid
Juan Lobos
Asked On December 2, 2016 08:26 PM UTC


Como puedo realizar la paginacion en el controlador, para enviar los datos paginados a la vista, hay alguna forma de hacerlo, ya que todos los ejemplos que he visto realizan la paginacion en el lado de la vista o del cliente.

De antemano muchas gracias.

Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On December 5, 2016 01:47 PM UTC

Hi Juan, 
We suspect that would like to handle server-side paging. This can be achieved using the URLAdaptor (of DataManager) which will be assigned as DataSource to the Grid. URLAdaptor manages the server actions which sends the POST requesting the data DataManager queries. So we can retrieve the required number of data and populate the same in Grid. DataManager also provides the Server-Side APIs to handle the Paging action in the server. AllowPaging must be enabled in the Grid to perform paging action in the server-end. Refer to the following code example. 
        .Datasource(ds => 
             . . . 
                 . ..  
        public ActionResult DataSource(Syncfusion.JavaScript.DataManager dm) 
            IEnumerable DataSource = new NorthwindDataContext().OrdersViews.ToList(); 
            DataOperations ds = new DataOperations(); 
            DataResult result = new DataResult(); 
            result.count = DataSource.AsQueryable().Count();//count 
            if (dm.Skip != null) 
                DataSource = ds.PerformSkip(DataSource, dm.Skip); 
            if (dm.Take != null) 
                DataSource = ds.PerformTake(DataSource, dm.Take); 
            result.result = DataSource; //resultant data 
            return Json(result, JsonRequestBehavior.AllowGet); 
Note: ReturnType of the READ (URL) Method must be result/count pair.  
Refer to the following Help Document. 
Likewise, we can perform other Grid actions like Filtering, Sorting in the Server-end. Refer to the following KB for the Server-side APIs DataManager. 
We have also prepared a sample that can be downloaded from the following location. 
Seeni Sakthi Kumar S. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon