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 6345967
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:55:34+00:00 2026-05-24T20:55:34+00:00

I am using the Infragistics jQuery grid in my ASP .NET MVC application. My

  • 0

I am using the Infragistics jQuery grid in my ASP .NET MVC application. My datasource is an ADO .NET Entity model referencing an SQL database. Here is the code from my controller to set up the grid and provide the datasource for it to pull from:

public ActionResult Index()
{
   var model = new GridModel();
   model.DataSourceUrl = Url.Action("GetInstrumentListData");
   this.InitializeGridOptions(model);
   return View(model);
}

public JsonResult GetInstrumentListData()
{
   var model = new GridModel();
   this.InitializeGridOptions(model);
   model.DataSource = _db.InstrumentLists.OrderBy(x => x.Tag).AsQueryable<InstrumentList>();
   return model.GetData();
}

private void InitializeGridOptions(GridModel model)
{
   Code to create columns...

   model.DefaultColumnWidth = "100px";
   model.Width = "100%";
   model.Height = "700px";

   model.Features.Add(new GridFiltering());

   var sort = new GridSorting();
   sort.Mode = SortingMode.Multiple;
   model.Features.Add(sort);

   var paging = new GridPaging();
   paging.PageSize = 30;
   model.Features.Add(paging);

   var selection = new GridSelection();
   selection.Mode = SelectionMode.Row;
   selection.MultipleSelection = true;
   model.Features.Add(selection);
}

The grid was taking ages to display (25-40 secs) so I did some investigating and it’s the model.GetData() call in GetInstrumentListData() that is taking up all the time. According to Intellisense, this function first performs data binding and generates the JsonResult object.

I thought that maybe since I was attempting to display a total of 1000 records (even though pagination is enabled and only displaying 30 each view) that maybe it was taking a while to convert those records into JSON, so I reduced the amount of records to 10 (from 1.2mb of JSON data to 12.5kb). There was no difference in time.

Here is the request tracing from Firebug.
Request tracing

Any ideas on what is happening?

EDIT: @allentranks’ answer and @AlastairPitts comment made me realise that it is in fact the source I am getting my data from. The source isn’t a table but a view, which was created by my DBA from a whole bunch of crazy joins. Turns out that it takes 13+ secs to run the query, so its no wonder its taking so long to load. Thanks for your help.

  • 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-05-24T20:55:34+00:00Added an answer on May 24, 2026 at 8:55 pm

    I am not sure why your InstrumentLists need to be ordered twice in your query.

    _db.InstrumentLists.OrderBy(x => x.Tag).AsQueryable<InstrumentList>().OrderBy(x => x.Tag);
    

    this should work:

    _db.InstrumentLists.OrderBy(x => x.Tag).ToList();
    

    And, you maybe need to create an index on the Tag column to execute the query more quickly.

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

Sidebar

Related Questions

If you are using ASP.NET MVC how are you doing grid display? Rolled your
Here's the specs: ASP.NET 3.5 using ASP.NET AJAX AJAX Control Toolkit jQuery 1.3.2 web
I do not have any code to show, but using asp.net, vb.net, and SQL
I am using Infragistics UltraGrid in a Windows Forms application. I need an event
We're using Infragistics grid (most probably, we'll have 8.2 version at the end) and
I am using an Infragistics UltraGrid in a WinForms application. Which event is raised
I am using UltraComboEditior of Infragistics Conrtrols in C# winform application, I want to
Infragistics Grid disappears when grid parent element is expanded/collapsed using JavaScript style.display property. When
I am attempting to create a clickable piechart in ASP.NET 2.0 with C# using
I am looking people's opinion and experience on using chart controls within an ASP.NET

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.