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

Paging not working

Thread ID:

Created:

Updated:

Platform:

Replies:

124366 Jun 4,2016 09:07 PM UTC Jun 6,2016 04:28 AM UTC ASP.NET MVC 2
loading
Tags: Grid
Arthur
Asked On June 4, 2016 09:07 PM UTC

Hello,

ive enabled paging on my Grid, but he still showing all Entries on one Site. On the footer of the grid i see the Pages and the text: 1 of 9 pages (99 items). But all items are displayed on the first page! If i click through the Pages, nothing happens:

@(Html.EJ().Grid<object>("MitarbeiterGrid")
      .Datasource(ds=>ds.URL("Mitarbeiter2/LoadData").CrudURL("Mitarbeiter2/CrudUpdate").Adaptor(AdaptorType.UrlAdaptor)).AllowPaging()
      .EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing().EditMode(EditMode.Normal); })
            .ToolbarSettings(toolbar =>
            {
                toolbar.ShowToolbar().ToolbarItems(items =>
                {
                    items.AddTool(ToolBarItems.Add);
                    items.AddTool(ToolBarItems.Edit);
                    items.AddTool(ToolBarItems.Delete);
                    items.AddTool(ToolBarItems.Update);
                    items.AddTool(ToolBarItems.Cancel);
                });
            })
      .Columns(col =>
      {
          col.Field("Id").Visible(false).IsPrimaryKey(true).Add();
          col.Field("Personalnummer").Add();
          col.Field("Vorname").Add();
          col.Field("Nachname").Add();
          col.Field("Email").Add();
          col.Field("Status").ForeignKeyField("wert").ForeignKeyValue("anzeige").DataSource((IEnumerable<object>)ViewBag.datasource1).Add();
          col.Field("MitarbeiterTyp_Id").HeaderText("Mitarbeitertyp").ForeignKeyField("Id").ForeignKeyValue("Typname").DataSource((IEnumerable<object>)ViewBag.datasource).Add();
      })
            )
----------------------------------------------------------------
Controller:

        public JsonResult LoadData()
        {
            ModelContext cont = new ModelContext();
            //cont.Configuration.LazyLoadingEnabled = false;
            var data = cont.Mitarbeiter.Include("MitarbeiterTyp").ToList();
            return Json(new {result= data, count = data.Count }, JsonRequestBehavior.AllowGet);
        }


THanks

Arthur
Replied On June 4, 2016 09:41 PM UTC


Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On June 6, 2016 04:28 AM UTC

Hi Aruthur, 

When using the URLAdaptor in ej.DataManager, you have to handle the Grid actions in the server-side. Please refer to the following for server-side APIs of DataManager. 
 

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.

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

;