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

Paging and Sorting is not working

Thread ID:

Created:

Updated:

Platform:

Replies:

148888 Nov 7,2019 07:51 AM UTC Nov 8,2019 06:27 AM UTC Vue 1
loading
Tags: Data Grid
Chew Ann Kenn
Asked On November 7, 2019 07:51 AM UTC

Hi,

I have been using the Syncfusion data grid.

The method I use is Custom Adaptor which extends the WebApiAdaptor.

The data send from response is following exactly the requirement which is Items:[{...}, {...}], Count: 830

I have set the pageSize: 5, therefore the data should be displayed 5 items in a page.

The data displayed inside the grid table is the all results instead of 5 items only. Moreover, when I change from page 1 to page 2, the data remain same which is displaying all the data instead of the 5 items.

Could you assist me on this issue?

Attachment: Dashboard_60334bd4.rar

Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On November 8, 2019 06:27 AM UTC

Hi Chew,  

Greetings from Syncfusion.  

We suspect that the Grid server-end skip/take actions were not handled. So we suggest to ensure skip/take functionality in the server-end. Refer to the following code example. 

    public class OrderController : ApiController 
    { 
        // GET: api/Order 
        public object Get() 
        { 
            var queryString = System.Web.HttpContext.Current.Request.QueryString; 
            int skip = Convert.ToInt32(queryString["$skip"]);  //paging 
            int take = Convert.ToInt32(queryString["$top"]); //paging 
            return new 
            { 
                Items = data.Skip(skip).Take(take), 
                Count = data.Count() 
                //  return order; 
            }; 
        } 
 

Regards,  
Seeni Sakthi Kumar S 


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.

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

Live Chat Icon For mobile
Live Chat Icon