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. Image for the cookie policy date

Paging not working properly in json and server mode (always executing a full table scan)

json and server mode is rendering the grid properly but in my Rhino Entity Framework profiler I can see that the grid is always requesting all rows.

This is my Index.cshtml for json mode:
@using start.Models;
@model IEnumerable<Adresse>
@{    ViewBag.Title = "Index";}
    @Html.ActionLink("Create New", "Create")
<div class="sample-panel-margin" style="width: 95%;">
    .Caption("Student Details")
    .Column(cols =>
    {        cols.Add(p => p.NAME1).Width(150).HeaderText("Name");
        cols.Add(p => p.VORNAME).Width(100).HeaderText("Vorname");
        cols.Add(p => p.STRASSE1).Width(200).HeaderText("Strasse");
        cols.Add(p => p.HAUSNR).Width(60).HeaderText("Haus Nr.");
        cols.Add(p => p.PLZ).Width(80).HeaderText("PLZ");
        cols.Add(p => p.ORT).Width(200).HeaderText("Ort");
        cols.Add(p => p.TELEFON).Width(150).HeaderText("Telefon");
        cols.Add(p => p.EMAIL).Width(200).HeaderText("E-Mail");
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Entity;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using start.Models;
using System.Collections;
using Syncfusion.Mvc.Grid;
using Syncfusion.DocIO.DLS;
using Syncfusion.Pdf;
using Syncfusion.XlsIO;

namespace start.Controllers
    public class AdressenController : Controller
        private Context db = new Context();

        // GET: /Adressen/

        public ActionResult Index()
            var data = new Context().Adressen.ToList();
            return View(data);

        public ActionResult Index(PagingParams args)
            IEnumerable data = new Context().Adressen.ToList();
            return data.GridActions<Adresse>();

I am using Visual Studio 2012, Entity Framework 5, Syncfusion.Grid.MVc
I am expecting that a paged grid is only requesting 15 records when pagesize is set to 15.
What am I doing wrong?

Sidenote: Same is working properly when I created the same grid with KendoUI.


2 Replies

MN Michael Nikolai April 25, 2013 04:43 PM UTC

Just realized that I copied the wrong compiler source.
This is what I have in Json Mode:
        public ActionResult Index()
        {            return View();        }
        public ActionResult Index(PagingParams args)
        {            IEnumerable data = new Context().Adressen.ToList();
            return data.GridJSONActions<Adresse>();        }

HJ Hariharan J V Syncfusion Team April 26, 2013 12:42 PM UTC

Hi Michael Nikolai,

Thanks for using Syncfusion product.

We are sorry for inconvenience caused. We are unable to reproduce the issue. We have prepared a simple sample, demonstrating the working of the sample and the same can be downloaded from the following links.

Sample: paging.zip


Could you please replicate your issue in the above sample and send back to us with more information so that we could able to sort out the cause of this issue and provide you a better solution.

Please let me know if any other concerns.



Hariharan J.V.

Live Chat Icon For mobile
Up arrow icon