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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:39:26+00:00 2026-05-31T13:39:26+00:00

jqGrid is powered by remote json data in ASP .NET MVC2 application. On page

  • 0

jqGrid is powered by remote json data in ASP .NET MVC2 application.
On page load two requests are sent to server: one to retrieve whole html page with colmodel and second invoked by jqgrid to retrieve data.

colmodel is stored in database and depends on user rights and user configuration. Creating colmodel requires number of sql server calls which take a while.

Both request require building colmodel in server. For data retrieval colmodel is required to get correct number of columns to build select statement.

Currently this colmodel is built two times for every request. Also total number of recods is required to be returned which is slow on large data (causes whole result scan in PostgreSql server).

How to speed the things up ?
How to build colmodel only once and send it and data in same request?

  • 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-31T13:39:27+00:00Added an answer on May 31, 2026 at 1:39 pm

    I agree that extension of jqGrid to support the loading of some parts of colModel per one Ajax will be very helpful. For about a year I posted the feature request for example.

    What you can do now:

    1. If I correct understand your requirements you need to show the user the subset of the columns depend on the user’s permissions. One can implement the requirement in one Ajax request. What you can do is: first don’t send the “hidden” data or send there as empty string. Seconds you can send the list of columns, which should be hidden, to the client. In the case you can implement the variable number of columns in jqGrid. You can send the information inside of userData part of JSON response for example. To have better performance with many hidden columns I would recommend you to call showCol or hideCol inside of beforeProcessing and hide/show the columns on the empty grid. It will speed up the performance of showCol or hideCol dramatically. If it’s needed you can include additional call of clearGridData.
    2. You have to optimize the retrieval colModel. I don’t understand why it should be slow. All depends from your implementation. In any way I am sure that one can make the retrieval really quickly.
    3. To improve the performance of request of data from the database you can consider don’t fill records field of the JSON response and set total to page + 1. It enebles the “Next” button of the pager. You should set total equal to page only if you returns less rows as the rows (number of rows per page). In the most cases it will be good criteria to detect the last page. You can additionally hide some field on the pager lake the “Last” button and the sp_1_... span which shows the total number of pages. You can do this by the usage of pgtext : "Page {0}" option or the usage of pginput: false to have no pager input at all. The viewrecords should be false (its default value). After all the customization you will don’t need to calculate the total number of records and in the way improve performance of the database request in case of large data.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

jqgrid is used to show stock status from server. Data is retrieved in json
jqGrid tree nodes are read from server using json data. Click in node reads
jqGrid multiple group search is used which produces grouped filters object. ASP .NET MVC2
If jqGrid row ids (passed as separate id property from json data in server)
Yesterday I was playing with jQGrid plugin and ASP.NET. Everything turned out well, my
My jqGrid gets its JSON data from a URL. It shows every columnt right
jQgrid row is edited using inline editing mode. Pressing Enter sends data to server
I'm using JQGrid to display my data (the server returns xml). The data seems
I have a jqGrid on an ASP.Net MVC view. I want to use to
I am using a JQGrid in one of my ASP.NET projects where the grid

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.