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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:02:18+00:00 2026-06-17T17:02:18+00:00

My jqGrid is displayed but it does’nt show the data I checked the json

  • 0

My jqGrid is displayed but it does’nt show the data I checked the json source and it is ok

 $(document).ready(function () {
    $("#grid").jqGrid(
    {
        url: 'GetDepartment',
        datatype: 'json',
        mtype: 'GET',
        colNames: ['Department ID', 'Department Name'],
        colModel: [
            { name: 'DepartmentID', index: 'DepartmentID' },
            { name: 'DepartmentName', index: 'DepartmentName'}
        ],
        pager: $("#GridPager"),
        rowNum: 2,
        rowList: [5, 10, 15, 20],
        width: 'auto',
        sortname: 'DepartmentID',
        sortorder: "ASC"
    })
    $("#grid").jqGrid('navGrid', '#GridPager', { add: false, edit: false, del: false, search: false})
})
  • 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-06-17T17:02:19+00:00Added an answer on June 17, 2026 at 5:02 pm

    I think you are missing jsonReader, add the below code to your grid

                jsonReader: {
                repeatitems: false
                id: "DepartmentID"
    
            },
    

    Take a look at the wiki for json format expected

    http://www.trirand.com/jqgridwiki/doku.php?id=wiki:retrieving_data#json_data

    so in your case the json response should be

    {  "rows":[{"DepartmentID":2,"DepartmentName":"Asset Mgmt Group "},{"DepartmentID":16,"DepartmentName":"Business Solutions Group"},{"DepartmentID":8,"DepartmentName":"CBMG"}] } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is client Side code: jQuery(document).ready(function(){ jQuery(#list).jqGrid({ url:'example.php', datatype: 'xml', mtype: 'GET', colNames:['Inv No','Date',
My jqGrid, displays columns, retrieves the data but it does not display them in
I want to display JQGrid with all column headers but without any data rows
My JqGrid code is as given below $('#grid').jqGrid({ url: '', scroll: 1, postData: {
I use jqGrid to display data which is retrieved using NHibernate. jqGrid does paging
I am working on to display JSON data into jQgrid . And able to
Possible Duplicate: can’t add data to jqGrid from php within json format I am
the rownum property of jqgrid by default takes 20. now i have json data
I'm new to jQuery/jqGrid. I want to return json formatted data from the asmx
The first page of results with a jqgrid rowObject returns expected data but then

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.