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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T14:40:44+00:00 2026-05-29T14:40:44+00:00

I was trying to follow the most recently updated tutorial for jqgrid and MVC3.

  • 0

I was trying to follow the most recently updated tutorial for jqgrid and MVC3. I have this script:

        myGrid.jqGrid({
            url: '<%= Url.Action("GridData") %>',
            datatype: 'json',
            mtype: 'POST',
            colNames: ['A', 'B', 'C'],
            colModel: [
                { name: 'A', index: 'A', key: true, width: 40
                },
                { name: 'B', index: 'B', width: 40
                },
                { name: 'C', index: 'C', width: 400
                }
            ],
            pager: '#pager',
            rowNum: 10,
            rowList: [5, 10, 20, 50],
            sortname: 'A',
            sortorder: 'desc',
            rownumbers: true,
            viewrecords: true,
            altRows: true,
            //altclass: 'myAltRowClass',
            height: '100%',
            gridview: true,
            jsonReader: { cell: "" },
            caption: 'Grid Title'
        });

I have a Controller in the Controllers folder caller HomeController with this inside:

public JsonResult GridData(string sidx, string sord, int page, int rows)
    {
        return Json(new
        {
            total = 1, // we'll implement later 
            page = page,
            records = 3, // implement later 
            rows = (
                    new[] {
                        new[]{"A", "B", "C"},
                        new[]{"1", "2", "3"},
                        new[]{"X", "Y", "Z"}
            }).ToList()
        });
    }

For some reason I can’t get GridData to be called. I set a break point on that function in the controller and it is not being hit.

What could I be missing? Do I need to setup the routing in the project somehow?

  • 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-29T14:40:46+00:00Added an answer on May 29, 2026 at 2:40 pm

    Try changing your Url.Action() call to this:

    <%= Url.Action("GridData", "Home") %>
    

    And just an FYI, this is not Razor syntax. If you are indeed using Razor, it would look like this:

    @Url.Action("GridData", "Home")
    

    And last point to ask: where is your JavaScript/jQuery code living? Is it embedded in your View markup?

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

Sidebar

Related Questions

I am trying to follow this tutorial on how to connect to a database
I am trying to set my machine up so I can follow this tutorial:
I've been trying to follow this tutorial for deploying a WCF sample to IIS
This is a follow up to this question , I'm trying to have the
I'm trying follow a tutorial to create a custom USB driver in Linux and
Trying to follow this example. (Section String sorting...) Is there anything obvious that would
I am trying to follow this example (from p137 of Rob Pickering's Foundations of
I have been trying to follow StyleCop's guidelines on a project, to see if
I have been trying to follow the few tutorials on how to create a
I am trying to follow the basic tutorial for Spring MVC but got lost

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.