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

How to use paging options?

Thread ID:

Created:

Updated:

Platform:

Replies:

131095 Jun 20,2017 09:40 AM UTC Jun 21,2017 12:49 PM UTC ASP.NET MVC 1
loading
Tags: Grid
Emeline DESHAYES
Asked On June 20, 2017 09:40 AM UTC

Hi,

I have this grid  in Razor:

@(Html.EJ().Grid<object>("GridSession")

    .Datasource((IEnumerable<SessionModel>)ViewBag.datasource)

    .AllowPaging()

    .PageSettings(paging =>

    {

        paging.AllowPaging(true);

        paging.PageSize(10);

        paging.PagerPosition(Position.BottomLeft);

        paging.PagerStyle(PagerStyle.DefaultAndAdvanced);

    })

    .Columns(col =>

    {

        col.Field("IDSession").HeaderText("Session ID").IsPrimaryKey(true).Width(100).Add();
        col.Field("User").HeaderText("User").Width(80).Add();

    })


As soon as I add the pagging, I have the following error:

MyApplication\Administration_SessionView.cshtml(17): error CS1660: Impossible de convertir expression lambda en type 'Syncfusion.JavaScript.Models.PageSettings', car il ne s'agit pas d'un type délégué


Thavasianand Sankaranarayanan [Syncfusion]
Replied On June 21, 2017 12:49 PM UTC

Hi Emeline, 

Thanks for contacting Syncfusion support. 

We have analyzed your code example and we are able to reproduce the reported issue from our end. Because the properties(paging.AllowPaging(true),  paging.PagerPosition(Position.BottomLeft), paging.PagerStyle(PagerStyle.DefaultAndAdvanced)) you have mentioned in pageSettings which are not defined properties of pageSettings API of ejGrid control . 

In default, if you enable allowPaging property it will take default page size as 12 also you can customize the page size through pageSize property of pageSettings and the pager shown in bottom left side. If you want to customize the pager then you can use the pager template in your sample. 

Refer the online sample for pager template. 


Refer the help documentation. 



If we misunderstood your query then please get back to us. 

Regards, 
Thavasianand 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.

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

;