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

  • Home
  • SEARCH
  • 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 6087399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:51:58+00:00 2026-05-23T11:51:58+00:00

Expert, I have created one application and implemented JQGrid for Add, Edit and Delete,

  • 0

Expert,

I have created one application and implemented JQGrid for Add, Edit and Delete, This is working fine with Running from Visual Studio 2010.

Now i created Virtual Directory for this application and then i am trying to access Index page it will not displaying anything because the JQGrid was not loaded it is giving me
following errr:
Error: jQuery(“#list”).jqGrid is not a function
Source File: http://localhost/CAFM/TabMaster
Line: 58

Here is the JQGrid code snippet.

jQuery(document).ready(function () {
        alert(jQuery("#list"));
        jQuery("#list").jqGrid({
            url: '/TabMaster/JQGridGetGridData',
            datatype: 'json',
            mtype: 'GET',
            colNames: ['col ID', 'First Name', 'Last Name'],
            colModel: [
                      { name: 'colID', index: 'colID', width: 100, align: 'left', searchoptions: { sopt: ['eq', 'ne', 'cn']} },
                      { name: 'FirstName', index: 'FirstName', width: 150, align: 'left', editable: true },
                      { name: 'LastName', index: 'LastName', width: 300, align: 'left', editable: true },
                    ],
            pager: jQuery('#pager'),
            rowNum: 100,
            rowList: [10, 50, 100, 500, 1000, 2000, 5000, 7000, 10000],
            sortname: 'colID',
            sortorder: "asc",
            viewrecords: true,
            multiselect: true,
            imgpath: '/scripts/themes/steel/images',
            caption: 'Tab Master Information'
        }).navGrid('#pager', { edit: true, add: true, del: true },
        // Edit options
                {
                savekey: [true, 13],
                reloadAfterSubmit: true,
                jqModal: false,
                closeOnEscape: true,
                closeAfterEdit: true,
                url: "/TabMaster/JQGridEdit",
                afterSubmit: function (response, postdata) {
                    if (response.responseText == "Success") {
                        jQuery("#success").show();
                        jQuery("#success").html("Record updated successfully! [" + postdata.FirstName + " " + postdata.LastName + "]");
                        jQuery("#success").fadeOut(6000);
                        return [true, response.responseText]
                    }
                    else {
                        return [false, response.responseText]
                    }
                }
            },
        // Add options
                {
                url: '/TabMaster/JQGridCreate',
                closeAfterAdd: true,
                afterSubmit: function (response, postdata) {
                    if (response.responseText == "Success") {
                        jQuery("#success").show();
                        jQuery("#success").html("Record added successfully! [" + postdata.FirstName + " " + postdata.LastName + "]");
                        jQuery("#success").fadeOut(6000);
                        return [true, response.responseText]
                    }
                    else {
                        return [false, response.responseText]
                    }
                }
            },
        // Delete options
               {
               url: '/TabMaster/JQGridRemove',
               afterSubmit: function (response, rowid) {
                   if (rowid.length > 0) {
                       jQuery("#success").show();
                       jQuery("#success").html("Record deleted successfully! [" + rowid + "]");
                       jQuery("#success").fadeOut(6000);
                       return [true, response.responseText]
                   }
                   else {
                       return [false, response.responseText]
                   }
               }
           },
                {
                    closeOnEscape: true,
                    multipleSearch: false,
                    closeAfterSearch: true
                }
                   );
    });

following are the JQuery files that i included in my projects.

 <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
    <link href="@Url.Content("~/Content/themes/base/jquery.ui.theme.css")" rel="Stylesheet" type="text/css" />
    <link href="@Url.Content("~/Scripts/themes/steel/grid.css")" rel="Stylesheet" type="text/css" />
    <link href="@Url.Content("~/Scripts/themes/jqModal.css")" rel="Stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.jqGrid.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/js/jqModal.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/js/jqDnR.js")" type="text/javascript"></script>

following is the hierarchy of Scripts

enter image description here

Thanks in advance!
Imdadhusen

  • 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-23T11:51:58+00:00Added an answer on May 23, 2026 at 11:51 am

    It doesn’t work because you have hardcoded your urls:

    url: '/TabMaster/JQGridGetGridData'
    

    You should always be using URL helpers when dealing with urls:

    url: '@Url.Action("JQGridGetGridData", "TabMaster")'
    

    When you deploy your application in a virtual directory the address i no longer /TabMaster/JQGridGetGridData but it is /YourApplicationName/TabMaster/JQGridGetGridData. That’s the reason why you should always use url helpers.

    The same stands true for your edit options url and your image paths. For static resources use @Url.Content and for controller actions use @Url.Action.

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

Sidebar

Related Questions

I've exported a number of sites from one SharePoint server. I have created a
I am attempting to add some multi-threading to a WPF application I have created
I have exceptions created for every condition that my application does not expect. UserNameNotValidException
I have this application I'm developing in JSP and I wish to export some
I'm a little stumped on this one. Anyone have any ideas? I'll try to
I have application which can export slides to PowerPoint. I'm using Microsoft.Office.Interop.PowerPoint.dll . This
I have created a simple Hello World Application using Flash Builder Burrito SDK. I
I am making application in ASP.Net 2.0 in VS 2010, i have created crystal
In my application I have updatepanel with few buttons. One of those button is
How does one compares to the other? I have an embedded application that if

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.