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

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

Thread ID:

Created:

Updated:

Platform:

Replies:

108531 Apr 25,2013 04:37 PM UTC Apr 26,2013 12:42 PM UTC ASP.NET MVC (Classic) 2
loading
Tags: Grid
Michael Nikolai
Asked On April 25, 2013 04:37 PM UTC

Hi,
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";}
<h2>Index</h2>
<p>
    @Html.ActionLink("Create New", "Create")
</p>
<div class="sample-panel-margin" style="width: 95%;">
    @(Html.Syncfusion().Grid<Adresse>("GenericListGrid")
    .ActionMode(ActionMode.JSON)
    .Caption("Student Details")
    .EnablePaging()
    .EnableSorting()
    .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");
    }))
</div>
----------------------------------------------
Controller:
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);
        }

        [AcceptVerbs(HttpVerbs.Post)]
        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 11.144.0.21.
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.

Regards,
Michael

Michael Nikolai
Replied On 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();        }
        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Index(PagingParams args)
        {            IEnumerable data = new Context().Adressen.ToList();
            return data.GridJSONActions<Adresse>();        }


Hariharan J V [Syncfusion]
Replied On 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.

 

Regards,

Hariharan J.V.


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

;