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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:22:23+00:00 2026-05-24T23:22:23+00:00

I want to show a JSON data at my table as like here: example

  • 0

I want to show a JSON data at my table as like here: example

I used that CSS imports:

<link rel="stylesheet" href="/css/ui.jqgrid.css"/>
<link rel="stylesheet" href="/css/ui.multiselect.css"/>
<link rel="stylesheet" href="/css/jquery-ui-1.8.1.custom.css"/>

That JS imports:

<script type=text/javascript src="/js/jquery.js"></script>
<script type=text/javascript src="/js/jquery_ui_1.8.1.js"></script>
<script type=text/javascript src="/js/jquery.layout.js"></script>
<script type=text/javascript src="/js/grid.locale-en.js"></script>
<script type="text/javascript">
    $.jgrid.no_legacy_api = true;
    $.jgrid.useJSON = true;
</script>
<script type="text/javascript" src="/js/ui.multiselect.js"></script>
<script type=text/javascript src="/js/jgrid_4.1.js"></script>
<script type="text/javascript" src="/js/jquery.tablednd.js"></script>
<script type="text/javascript" src="/js/jquery.contextmenu.js"></script>

(Some files has different name but they are OK)

I am getting a JSON data from an URL and when I check it it comes correctly at Firebug.
That’s my HTML data:

<table id="confTable"></table>
<div id="pconfTable"></div>

That’s my script to populate data:

jQuery("#confTable").jqGrid({ ajaxGridOptions : {type:"GET"}, serializeGridData : function(postdata) {
            postdata.page = 1;
            return postdata;
        }, url:'/ui/webapp/conf', datatype: 'json', colNames:['Value','Type', 'Target Module', 'Configuration Group', 'Name', 'Description', 'Identity', 'Version', 'System Id', 'Active'],
            colModel:[
                {name:'value',index:'value', width:55},
                {name:'type',index:'type', width:55},
                {name:'targetModule',index:'targetModule', width:150},
                {name:'configurationGroup',index:'configurationGroup', width:180},
                {name:'name',index:'name asc', width:90},
                {name:'description',index:'description', width:90},
                {name:'identity',index:'identity', width:90},
                {name:'version',index:'version', width:90},
                {name:'systemId',index:'systemId', width:100},
                {name:'active',index:'active', width:100}
            ], rowNum:10, width:980, rowList:[10,20,30], pager: '#pconfTable', sortname: 'name', viewrecords: true, sortorder: "desc", caption:"Configuration Information" });
        jQuery("#pconfTable").jqGrid('navGrid', '#pconfTable', {edit:false,add:false,del:false});

That’s JSON data that I get:

[{
        "value":"10",
        "type":"Tip 1",
        "targetModule":"Target 1",
        "configurationGroup":null,
        "name":"Configuration Deneme 1",
        "description":null,
        "identity":"Configuration Deneme 1",
        "version":0,
        "systemId":0,
        "active":true
    },
    {
        "value":"50",
        "type":"Tip 2",
        "targetModule":"Target 2",
        "configurationGroup":null,
        "name":"Configuration Deneme 2",
        "description":null,
        "identity":"Configuration Deneme 2",
        "version":0,
        "systemId":0,
        "active":true
    },
    {
        "value":"100",
        "type":"Tip 3",
        "targetModule":"Target 3",
        "configurationGroup":null,
        "name":"Configuration Deneme 3",
        "description":null,
        "identity":"Configuration Deneme 3",
        "version":0,
        "systemId":0,
        "active":true
    }
]

I have formatted indentation to be read easiliy.

However I don’t get any error from Firebug and don’t have any can’t imported files I still have an empty table.

Any ideas?

PS: Is there anything wrong with my JSON data, should I send a data starts as like => total: xxx, page: yyy, records: zzz, rows: or not a must?

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

    To see the grid filled you should use the following jsonReader as additional jqGrid parameter

    jsonReader: {
        repeatitems: false,
        id: "value",
        root: function (obj) { return obj; },
        page: function (obj) { return 1; },
        total: function (obj) { return 1; },
        records: function (obj) { return obj.length; }
    }
    

    I suppose, that the values from the 'value' column are unique, so I used id: "value" in the jsonReader above.

    By the way the ajaxGridOptions : {type:"GET"} do nothing. The default mtype: 'GET' do the same. In the call of navGrid method you should use jQuery("#confTable") instead of jQuery("#pconfTable").

    After the described changed you will have the following demo. In the demo I added height: 'auto' to have less empty space in the grid.

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

Sidebar

Related Questions

It seems that when I want to show JSON data if it has a
I am loading some JSON data in an AsyncTask, as I want to show
We want to show a hint for a JList that the user can select
I want to show a table of fixed width at the center of browser
I want to show first element that is hidden by jquery. my html code
I have a JSON object items which has few items that I want to
I have a php script that outputs json data. For the purposes of testing,
I download json data from server and I want to save them to a
I am getting json data as a response back from the server. I want
I want to show an animation wile an operation takes place... and when that

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.