Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8671183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:53:14+00:00 2026-06-12T18:53:14+00:00

I am using Telerik Grid MVC with AJAX binding. I thought that if I

  • 0

I am using Telerik Grid MVC with AJAX binding.

I thought that if I provide IQueryable to the grid, paging/sorting/filtering would be done at the database server. Like so:

[GridAction]
public ActionResult Select()
{
    return View(new GridModel(Mapper.Map<IEnumerable<DokumentVM>>(db.Dokumenti)));        
}

I created test data of about 10000 documents in database, and upper command resulted in each of them hauled into the grid. And obviously, it takes forever.

Grid is bound via AJAX, like this:

@(Html.Telerik().Grid<ViewModels.DokumentVM>()
.DataBinding(b => b.Ajax().Select("Select", "Dokument"))
.Pageable(p => p.PageSize(20))
.Sortable(s => s.SortMode(GridSortMode.MultipleColumn).OrderBy(m => { m.Add("Date").Descending(); m.Add("Number").Descending(); })))

Inside Select ActionMethod, when inspecting Request (its Form), I see that grid sends all info needed for proper functioning:

page:     1
size:     20
orderBy:  Date-desc~Number-desc

But when I further inspect SQL command sent to database, I see that there is only SELECT command present, no WHERE, no ORDER by, no nothing, which brings down all my data.

I am wondering if it is possible for Paging/Sorting/Filtering to work automatically, or do I need to translate info sent by the grid into SQL commands myself. I was under impression that all I needed is to provide IQueryable and Grid would do the rest. But that’s not working for me.

Maybe I am doing something wrong, or maybe this is not even possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:53:15+00:00Added an answer on June 12, 2026 at 6:53 pm

    The problem is using AutoMapper! when you call this line :

     return View(new GridModel(Mapper.Map<IEnumerable<DokumentVM>>(db.Dokumenti)));
    

    at first , AutoMapper tries to convert all of your db.Dokumenti rows into new form in memory function. After that the mapped data passes to GridModel. All things about paging and ordering happens inside this class.

    So you should avoid using AutoMapper at this level and using a different strategy. for example you can make a query like this :

    var q= from r in db.Dokumenti select new DokumentVM(){ ... }
    

    and then pass the q variable into GridModel class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the Telerik MVC grid, with Ajax data binding. I would like
I am using Telerik MVC grid ajax binding to show some records. While the
I am using Telerik MVC Grid, with ajax binding and I use grid editing
i'm using telerik grid for mvc. I am using ajax binding, following is the
I am using the Telerik MVC grid, together with AJAX binding to actions secured
I am using the Telerik MVC Grid with Ajax binding, and am having a
I am working with some custom ajax functionality using Telerik's MVC Grid and I
Using telerik mvc grid with ajax, give me some headaches. I am trying to
Using a Telerik Grid with ASP.NET MVC 3 Razor engine. When a user selects
I have an MVC telerik grid that I have set up to do custom

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.