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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:27:55+00:00 2026-05-30T21:27:55+00:00

My jqGrid is coming empty with JSON call. Though it is working with datatype=’jsonstring’

  • 0

My jqGrid is coming empty with JSON call. Though it is working with datatype=’jsonstring’ but not with json type. here is my JSON

{
    "d": {
        "total": 6,
        "page": 1,
        "records": 6,
        "rows": [
            {
                "id": 1,
                "Name": "James",
                "EMPID": "0000000056",
                "EMPDATE": "",
                "JOBTYPE": "REQ",
                "DEPTID": "FIN",
                "STATUS": "P1"
            },
            {
                "id": 2,
                "Name": "James",
                "EMPID": "R2",
                "EMPDATE": "",
                "JOBTYPE": "REQ",
                "DEPTID": "FIN",
                "STATUS": "P1"
            },
            {
                "id": 3,
                "Name": "James",
                "EMPID": "V2",
                "EMPDATE": "",
                "JOBTYPE": "VOU",
                "DEPTID": "FIN",
                "STATUS": ""
            },
            {
                "id": 4,
                "Name": "James",
                "EMPID": "V1",
                "EMPDATE": "",
                "JOBTYPE": "VOU",
                "DEPTID": "FIN",
                "STATUS": ""
            },
            {
                "id": 5,
                "Name": "James",
                "EMPID": "009017",
                "EMPDATE": "",
                "JOBTYPE": "PY",
                "DEPTID": "",
                "STATUS": "V2"
            },
            {
                "id": 6,
                "Name": "James",
                "EMPID": "009018",
                "EMPDATE": "",
                "JOBTYPE": "PY",
                "DEPTID": "",
                "STATUS": "V1"
            }
        ]
    }
}

and my jqGrid call from javascript is

function getgrid()
    {

    $("#list").jqGrid({
     url:'http://10.240.26.41/GetGridFields',
    datatype: 'json',
    mtype: 'GET',
    ajaxGridOptions: { contentType: 'application/json; charset=utf-8' },
    //serializeGridData: function (postData) {
    //    return JSON.stringify(postData);
    //     },
    jsonReader: { repeatitems: false, root: "d.rows", page: "d.page", total: "d.total",   records: "d.records" },
    colModel: [
        { name: 'id', key: true, width: 60, align: "center", hidden: false },
        { name: 'Name', width: 80, sortable: false, hidden: false },
        { name: 'EMPID', width: 180, sortable: false, hidden: false },
        { name: 'EMPDATE', width: 180, sortable: false, hidden: false },

        { name: 'JOBTYPE', width: 180, sortable: false, hidden: false },
        { name: 'DEPTID', width: 180, sortable: false, hidden: false },
        { name: 'STATUS', width: 180, sortable: false, hidden: false }
    ],
    rowNum: 10,
    rowList: [10, 20, 300],
    pager: "#pager",
    viewrecords: true,
    gridview: true,
    rownumbers: true,
    height: 230,
    caption: 'Emp Detail'
    })

    }

Please let me know where i am wrong here. It is working fine with jsonstring.

  • 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-30T21:27:57+00:00Added an answer on May 30, 2026 at 9:27 pm

    How you can see on the demo your jqGrid can read your JSON data. I made in the demo only minimal optimization changes which don’t important for your main problem.

    So I suppose, that you have either the problem with the usage of full URL (you should use '/GetGridFields' instead of 'http://10.240.26.41/GetGridFields') because you can’t get Ajax call to another IP host because of the same origin policy. One other possible reason is that you have wrong 'Content-Type' or some other HTTP header. You can examine the HTTP headers with respect of Fiddler, Firebug or just with Developer Tools of IE or Chrome (see “Network” tab).

    In any way I would recommend you to include loadError handler to jqGrid. See the answer for details.

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

Sidebar

Related Questions

I'm trying to create a jqgrid, but the table is empty. The table renders,
My jqGrid, displays columns, retrieves the data but it does not display them in
jqGrid takes the following JSON format: { total: 5, page: 2, records: 55, rows
With jqGrid if width of columns are not specified, they share the width of
I have jqGrid 3.5 (full) mostly working. I have it retrieving data with the
I have some JSON data coming from a service. I don't know the exact
jqgrid is used to show stock status from server. Data is retrieved in json
jqgrid doc in here contains: method allow to reorder the grid columns using the
JQgrid outputs this html for a left aligned cell - but it is too
My jqGrid that does a great job of pulling data from my database, but

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.