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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:12:36+00:00 2026-06-12T16:12:36+00:00

I need to pass an extra paramter (i.e. the selected row_id ) to the

  • 0

I need to pass an extra paramter (i.e. the selected row_id) to the url that I am using for to show the sub grid. But Firebug console panel shows no extra parameter been passed. (of course the server side code is also not receiving it).

Below is my code,

myGrid.jqGrid({
    url: 'server.php',
    datatype: "json",
    mtype: 'POST',
    width: 900,
    height:500,
    sortname: 'productid',
    viewrecords: true,
    sortorder: "desc",
    caption: "JSON Example",
    rowNum: 100,
    subGrid: true,
    colNames: ['Product Id', 'Product Name', 'Supplier Id', 'Unit Price'],
    colModel: [
        {
        name: 'productid',
        index: 'productid',
        search: true,
        width: 55
    }, {
        name: 'productname',
        index: 'productname',
        width: 90,
        search: true
    }, {
        name: 'supplierid',
        index: 'supplierid',
        width: 100,
        search: false
    }, {
        name: 'unitprice',
        index: 'unitprice',
        width: 80,
        search: false,
        align: "right",
        search: true
    }
    ],

    subGridRowExpanded: function (subgrid_id, row_id) {
        var subgrid_table_id, pager_id;
        subgrid_table_id = subgrid_id + "_t";
        pager_id = "p_" + subgrid_table_id;
        $("#" + subgrid_id)
                .html("<table id='" + subgrid_table_id + "' class='scroll'></table><div id='" + pager_id + "' class='scroll'></div>");
        jQuery("#" + subgrid_table_id)
                .jqGrid({
                    url: "server.php",
                    datatype: "json",
                    colNames: ['Product Id', 'Product Name'],
                    width:700,
                    colModel: [{
                        name: 'productid',
                        index: 'productid',
                        width: 55

                    }, {
                        name: 'productname',
                        index: 'productname',
                        width: 90
                    }],
                    rowNum: 20,
                    sortname: 'num',
                    sortorder: "asc"
                    data: {prodcutid: row_id}

                });
    }

How to pass the selected row id to the subgrid’s url?

Thanks

  • 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-12T16:12:37+00:00Added an answer on June 12, 2026 at 4:12 pm

    The data parameter has another meaning in jqGrid as in jQuery.ajax. So you should replace

    data: {prodcutid: row_id}
    

    in the SubGrid to

    postData: {prodcutid: row_id}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

http://www.domainname.com/#changepassword I need to pass an extra variable with a URL like above. I've
I need to pass an extra parameter :mobilejs => true from jQuery to a
I need to pass argument to JNLP dynamically for which I tried using a
I need to pass extra variables to a jQuery, ajax callback function. For example,
Right now we use DI/IOC and when we need to pass extra parameters to
I am using the following jQuery function in which i need to pass an
I need to pass Cursor object to another activity, what is the best way
I need to pass a variable which is captured from client side via jquery
I need to pass a parameter from an EditText and when I click the
I need to pass a simple Javascript array to my wcf ajax webservice: var

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.