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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:08:59+00:00 2026-05-28T08:08:59+00:00

I am using a jqgrid’s treegrid and the data for the child nodes is

  • 0

I am using a jqgrid’s treegrid and the data for the child nodes is being loaded on request.
But when user clicks on a node (say node1) to expand it and immediately clicks on another node (say node2) then the children of first node (node1) are being displayed for the second node (node2), the icon of node2 changes to show as expanded but it has data of node1’s children and collapsing node2 doesn’t do anything but collapsing node1 collapses node1’s children which are displayed as node2’s children.

Did someone else face such a problem? data for jqgrid is adjacency model in json format.

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

    It looks like a bug in jqGrid. I looked in the code and I think I understand the problem.

    Every time the user click on the “expand” icon the code will be executed which call expandRow and expandNode methods. The code of expandNode first overwrite the current value of the treeANode parameter of jqGrid which are used internally to identify the row after which the new data will be added. Then the nodeid, parentid (or n_left and n_right for the 'nested' grid model) and n_level parameters of the new request to the server will be set and after that the reloadGrid will be triggered.

    The problem is that later, during processing of the reloadGrid at the beginning of the internal populate method, the internal .grid.hDiv.loading property will be tested and if it was set be the previous still pending request then the second reloading of the grid will be skipped. The problem is that the value of the treeANode parameter is already changed. So the items returned as the children of the first expending node will be added as clidren of the last clicked node.

    As the bug fix I suggest to modify the line of code to the following

    } else if (!this.grid.hDiv.loading) {
    

    In the way the treeANode parameter will be not overwritten by the click on the second if another pending request is still processing.

    You can download from here the modified version of the jquery.jqGrid.src.js and test whether the problem will be solved after the bug fix. If it will solve the problem I’ll post the corresponding bug report with my suggestion how to fix the problem on the trirand forum.

    As another workaround you can use loadui: 'block' option of jqGrid which will not allow any user interactions during the processing of the pending requests to the server.

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

Sidebar

Related Questions

I am having trouble constructing a jqGrid TreeGrid using local data. This method works
I am using jqgrid treegrid to load the data remotely on expand event. It
I am using jqGrid ( http://www.trirand.com/blog/ ) to display some read-only data. The resizeable
I am using jqGrid to render some data. Now I want the ability to
I am using JQGrid in my solution in which i load tabs dynamically, but
I'm using jqGrid and am having an issue with one cells data. The contents
Hi I'm using jqgrid to show some information in a grid. But I have
I am using jqgrid with local data and I know how to edit a
I'm using jqGrid's filterToolbar method to let users quick search/filter the grid data. I'm
Question : using jqgrid to show data of a table. table has foreign key

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.