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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:17:29+00:00 2026-05-13T11:17:29+00:00

I’m trying this source where jqGrid gets some json data from django: link Unfortunately

  • 0

I’m trying this source where jqGrid gets some json data from django: link

Unfortunately the data is not presented in the jqgrid, only an empty jqgrid.

I’m rendering the jqgrid with this call:

<script type="text/javascript">
    $(function () {
        $.getJSON("{% url myapp.views_json.grid_config %}", function(data){
            $("#mygrid")
                .jqGrid(data)
                .navGrid('#pager', 
                    {add: false, edit: false, del: false, view: true},
            {}, // edit options
            {}, // add options
            {}, // del options 
            { multipleSearch:true, closeOnEscape:true }, // search options 
            { jqModal:false, closeOnEscape:true} // view options 
            );
        });
    });
</script>

{% url myapp.views_json.grid_config %} is resolved to the url “projects/examplegrid/cfg/”. When I call this URL in my browser it returns JSON data. Please follow the link to see it. json config data

This should be ok. I guess..
In this json data file you see an url: http://127.0.0.1:8000/pm/projects/examplegrid/
This url returns also json data. This is the json representation of the data that I want to present. See this json data set here: link

Here is a screenshot of the resulting jqgrid. link
I know it’s probably tough to help me out here. But it seems to me as that my problem is on the jqgrid side and I think there are a lot of cracks outside who know who to deal with it. I do not 🙂

Edit: The undefined error is gone. This error was due a missing reference to a local file:

 <script type="text/javascript" src="http://localhost:8000/media/js/i18n/grid.locale-en.js"></script> 

But the next error is, that it shows “Loading” and it does not finish. Anybody knows what the problem could be?

Edit: The errow was obviously that the jqgrid was not initialised correctly. I used the wiki page proposed by CalebD and it works now. At least the json data is presented in the grid. I’m wondering now what I have to do in order to update a row.

<script type="text/javascript">
    jQuery(document).ready(function(){ 
      jQuery("#grid").jqGrid({
          url:'http://127.0.0.1:8000/pm/projects/examplegrid/',
          datatype: "json",
          mtype: 'GET',
          colNames:['id', 'description'],
          colModel:[
                    {name:'id',index:'id', width:55, sortable:false, editable:false, editoptions:{readonly:true,size:10}},
                    {name:'description',index:'description', width:300, editable:true},
               ],
         jsonReader : {
              repeatitems:false
         },
          rowNum:10,
          rowList:[10,20,30],
          pager: jQuery('#gridpager'),
          sortname: 'name',
          viewrecords: true,
          sortorder: "asc",
          caption:"Wines",
          editurl:"http://127.0.0.1:8000/pm/projects/examplegrid/"
     }).navGrid('#gridpager');
    });
</script>
  • 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-13T11:17:29+00:00Added an answer on May 13, 2026 at 11:17 am

    The parameter for .jqGrid excepts a JS object that describes settings for the grid, not JSON data. You have to define the data type, columns, and column models, among other options. The jqGrid wiki has some examples:

    http://www.trirand.com/jqgridwiki/doku.php?id=wiki:conventions

    If you scroll down, there is an example using JSON.

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

Sidebar

Ask A Question

Stats

  • Questions 338k
  • Answers 338k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Just to clarify, you are having problems calling the model's… May 14, 2026 at 4:12 am
  • Editorial Team
    Editorial Team added an answer Cocoa is Mac and iPhone only, but you could use… May 14, 2026 at 4:12 am
  • Editorial Team
    Editorial Team added an answer Animate can take a callback which is a function that… May 14, 2026 at 4:12 am

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want use html5's new tag to play a wav file (currently only supported
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I've got a string that has curly quotes in it. I'd like to replace
In order to apply a triggered animation to all ToolTip s in my app,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.