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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:31:13+00:00 2026-05-23T08:31:13+00:00

I’ve been lurking around on various forums, and reading several stackoverflow questions related to

  • 0

I’ve been lurking around on various forums, and reading several stackoverflow questions related to this problem, but I can’t for the life of me figure out what’s wrong.

I try to generate a jqGrid treeGrid, using the following code:

      jQuery("#structureBuilderTable").jqGrid({
        url: 'tree.json',
        datatype:'json',
        mtype:'GET',
        colNames: ["ID", "Description", "Total"],
        colModel: [
        {name:'id', index:'id', width: 1, hidden: true, key: true},
        {name:'desc', index:'desc', hidden: false, sortable: true},
        {name:'num', index:'num', hidden: false, sortable: true}
        ],
        treeGridModel:'adjacency',
        height:'auto',
        width:'500',
        pager:"#ptreegrid",
        treeGrid: true,
        ExpandColumn:'desc',
        ExpandColClick: true,
        caption:"TreeGrid Test"
      });

This is my .json file (for example purposes):

{
    "total": "1",
    "page": "1",
    "records": "2",
    "rows": [
           {"id": "1", "cell": ["1", "Super Item", "300", "0", "null", "false", "false"]},
           {"id": "2", "cell": ["2", "Item 1", "100", "1", "1", "false", "false"]},
           {"id": "3", "cell": ["3", "Sub Item 1", "50", "2", "2", "true", "true"]},
           {"id": "4", "cell": ["4", "Sub Item 2", "25", "2", "2", "false", "false"]},
           {"id": "5", "cell": ["5", "Sub-sub Item 1", "25", "3", "4", "true", "true"]},
           {"id": "6", "cell": ["6", "Sub Item 3", "25", "2", "2", "true", "true"]},
           {"id": "7", "cell": ["7", "Item 2", "200", "1", "1", "false", "false"]},
           {"id": "8", "cell": ["8", "Sub Item 1", "100", "2", "7", "false", "false"]},
           {"id": "9", "cell": ["9", "Sub-sub Item 1", "50", "3", "8", "true", "true"]},
           {"id": "10", "cell": ["10", "Sub-sub Item 2", "50", "3", "8", "true", "true"]},
           {"id": "11", "cell": ["11", "Sub Item 2", "100", "2", "7", "true", "true"]}
    ]
}

(this is pretty much a direct copy of a guide I found online).

Now, the grid is generated, but it doesn’t contain any data. The javascript file is in the same directory as ‘tree.json’, but somehow it doesn’t seem to find it. I used the following for debugging purposes:

loadError: function(xhr, status, error) {alert(status +error)}

and this is the alert I got:

errorNot Found

Any help would be greatly appreaciated.

  • 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-23T08:31:14+00:00Added an answer on May 23, 2026 at 8:31 am

    I hope that the demo created based on your JSON data and the jqGrid will help you to find the error in your code. Probably you just forgot to place the code which create the grid inside of jQuery(function(){/**/});.

    Only one tip: If you would like that some tree node will be shown expanded like in my demo, you will have to set not only the “true” value in the last column (“expanded” hidden column), but add “true” value for the hidden “loaded” column of the tree grid. See here and here for more details.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I am reading a book about Javascript and jQuery and using one of the

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.