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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Apply paging, sorting and filtering with server

Thread ID:

Created:

Updated:

Platform:

Replies:

130021 Apr 16,2017 11:22 AM UTC Apr 18,2017 02:49 AM UTC AngularJS 1
loading
Tags: ejGrid
Omar Ramadan
Asked On April 16, 2017 11:22 AM UTC

I need to get only data of current page from web api 
and go to server with change page with parameters of sorting, filtering and new page
how to apply that using angular grid
regards, 
Omar Ramadan 

Venkatesh Ayothi Raman [Syncfusion]
Replied On April 18, 2017 02:49 AM UTC

Hi Omar, 

Thanks for contacting Syncfusion support. 
We have built-in support of web api adaptor for bound the grid data as well as perform the sorting, filtering and paging as server side. Please refer to the following Help documentation for more information, 
We have also prepared the sample based on your requirement which can be download from following link. 

In that sample, we have rendered the Grid using angular and web api adaptor. Here, we can get the filter, paging and sorting details like as follows, 
Code example
@server side 
public object Get() 
        { 
            var queryString = System.Web.HttpContext.Current.Request.QueryString; 
            int skip = Convert.ToInt32(queryString["$skip"]); 
            int take = Convert.ToInt32(queryString["$top"]);  
            List<EmployeeTable> emp = db.EmployeeTables.ToList();   
  
            //here we can perform the filter/sorting     
                 
            var data=emp.Skip(skip).Take(take).ToList();   //paging operation  
            return new { Items = data.Skip(skip).Take(take), Count = data.Count() };  
 
        } 

Screenshot for filtering
 
Screenshot for sorting
 


Regards, 
Venkatesh Ayothiraman. 


CONFIRMATION

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.

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

;