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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:10:44+00:00 2026-05-17T23:10:44+00:00

I run into this problem few hours ago, and I can’t get around it.

  • 0

I run into this problem few hours ago, and I can’t get around it.

I’m trying to implement JqGrid into my ASP.NET MVC application. I was using examples from Phil Haack’s blog post.

I imported js and css:

    <link href="/Content/jquery-ui-1.8.5.custom.css" rel="stylesheet" type="text/css"  />
    <link href="/Content/ui.jgrid.css" rel="stylesheet" type="text/css"  />
    <script type="text/javascript" src="/Scripts/jquery-1.4.1.js"></script>
    <script type="text/javascript" src="/Scripts/jquery-ui-1.8.5.custom.min.js"></script>
    <script type="text/javascript" src="/Scripts/jquery.jqGrid.min.js" ></script>
    <script type="text/javascript" src="/Scripts/grid.local-en.js" ></script>

I put this code in view:

<script type="text/javascript">
    jQuery(document).ready(function() {
        jQuery("#list").jqGrid({
            url: '/Ticket/All/',
            datatype: 'json',
            mtype: 'GET',
            colNames: ['Id', 'Hardware', 'Issue', 'IssueDetails', 'RequestedBy', 'AssignedTo', 'Priority', 'State'],
            colModel: [
          { name: 'Id', index: 'Id', width: 40, align: 'left' },
          { name: 'Hardware', index: 'Hardware', width: 40, align: 'left' },
          { name: 'Issue', index: 'Issue', width: 200, align: 'left' },
          { name: 'IssueDetails', index: 'IssueDetails', width: 200, align: 'left' },
          { name: 'RequestedBy', index: 'RequestedBy', width: 40, align: 'left' },
          { name: 'AssignedTo', index: 'AssignedTo', width: 40, align: 'left' },
          { name: 'Priority', index: 'Priority', width: 40, align: 'left' },
          { name: 'State', index: 'State', width: 40, align: 'left'}],
            pager: jQuery('#pager'),
            rowNum: 10,
            rowList: [5, 10, 20, 50],
            sortname: 'Id',
            sortorder: "desc",
            viewrecords: true,
            caption: 'My first grid'
        });
    }); 
</script>

<h2>My Grid Data</h2>
<table id="list" class="scroll" cellpadding="0" cellspacing="0"></table>
<div id="pager" class="scroll" style="text-align:center;"></div>

And here is my test action in Ticket controller:

 public ActionResult All(string sidx, string sord, int page, int rows)
    {
        var jsonData = new
        {
            total = 1, // we'll implement later 
            page = page,
            records = 3, // implement later 
            rows = new[]{
                new {id = 1, cell = new[] {"1", "hard asdf", "issue adfds", "more issue", "someuser", "otheruser", "2", "Submitted"}},
                new {id = 2, cell = new[] {"2", "hard asdf", "issue adfds", "more issue", "someuser", "otheruser", "2", "Submitted"}},
                new {id = 3, cell = new[] {"3", "hard asdf", "issue adfds", "more issue", "someuser", "otheruser", "2", "Submitted"}}
            }
        };
        return Json(jsonData);
    }

At this moment, I can see empty grid, but whole page is covered with with overlay, and I can’t click anything (that’s probably “loading” overlay).

What’s wrong in here?

  • 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-17T23:10:45+00:00Added an answer on May 17, 2026 at 11:10 pm

    kMike,

    you need to add the following to the return statement (assuming mvc 2):

    return Json(jsonData, JsonRequestBehavior.AllowGet);
    

    that should hopefully fix the problem. also, as noted in the comment on the OT, check in firebug for any issues with the request.

    [edit] – also make you signature along these lines for tighter coupling to the return type:

    public JsonResult All(string sidx, string sord, int page, int rows)
    

    plus, had this in my bookmarks: http://techshorts.blogspot.com/2009/04/json-for-jqgrid-from-aspnet-mvc.html

    enjoy 🙂

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

Sidebar

Related Questions

No related questions found

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.