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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:39:10+00:00 2026-06-13T09:39:10+00:00

When I try to expand a row of parent table to show a sub

  • 0

When I try to expand a row of parent table to show a sub grid, the ID that is being passed is being generated by javascript. So the first row of the parent table gets a rowid of 1, second the rowid of 2. So when I click to expand the subgrid for each of them, the URL that gets called is myurl.html?q=1 and myurl.html?q=2. I’m using the q=? part of the query to fetch the rows for the subgrid.

However, the problem is that my parent rows are stored in the database with a unique id, which is not 1 2 3 etc. it is an autogenerated id by Mysql.

Question

How can I change the behavior of parentGrid or subGrid so that when subgrid is expanded, rather than autogenerated 1, 2, 3, etc. I get the actual ID of the parent row as it is in the DB.

  • 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-06-13T09:39:11+00:00Added an answer on June 13, 2026 at 9:39 am

    You wrote about “autogenerated 1, 2, 3, etc”. It shows that you fill the grid in not correct way. The data returned from the server should contain id used as the id of the rows (<tr>) and named frequently as rowid. Only if jqGrid don’t find any information about rowids in the input data the values 1, 2, 3, etc will be used per default.

    Such behavior is not only bad if you have native ids from the database the the rows of grid. More bad is that you could receive id duplicates if you have more as one grid on the page or if you have grid with subgrids.

    So you should follow two rules:

    1. return the data which includes native ids from the database when the ids exist.
    2. use idPrefix if you use subgrids or if you have more as one grid on the page.

    I recommend you to read the answer and this one. Another answer could be also interesting for you.

    • 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 grid inside a grid row when I expand the
Try executing the following in JavaScript: parseInt('01'); //equals 1 parseInt('02'); //equals 2 parseInt('03'); //equals
I have on this page a clickable +/- icon that will expand and collapse
I've written a simple application that works with database. My program have a table
I have a table with 1 row and 5 columns. I have fixed the
I have a mobile app that I developed using PhoneGap (and html/css/javascript) and there
I suppose my question in not that clear but let me try to explain
I want to make only one item in the parent list expand at a
I will try to expand my problem: I have a link: <a href=# onClick=Display();
Try this code - import java.io.StringReader; public class StringReaderTest { public static void main(String[]

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.