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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:27:41+00:00 2026-06-12T20:27:41+00:00

I am using jqgrid, and added one subgrid inside it, which looks like as

  • 0

I am using jqgrid, and added one subgrid inside it, which looks like as below,

enter image description here

As you can see,
Rows with columns having 11 and 13 are main grid rows

And every row has subgrid having interest,
The Add Record element shows Add Pop up for Subgrid

Here is the code for subgrid looks like,

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:"shops?q=2&ShopID="+row_id,
                datatype: "xml",
                colNames: ['Interest'],
                colModel: [
                    //{name:"Id",index:"ShopID",width:80,editable:false,editoptions:{readonly:false,size:40}}, //Shop ID not required
                    {name:"id",index:"id",editable:true,edittype:"select",editoptions:{dataUrl:'shops?q=3&ShopID='+row_id},editrules:{required:true}}
                ],
                rowNum:10,
                pager: pager_id,
                width: '100%',
                height: '100%',
                scrollOffset: 0,
                sortname: 'num',
                sortorder: "asc",
                height: '100%',
                editurl:'shops?q=5&ShopID='+row_id
            });
            jQuery("#"+subgrid_table_id).jqGrid('navGrid',"#"+pager_id,{edit:false,add:true,del:true})
        },
        subGridRowColapsed: function(subgrid_id, row_id) {
            // this function is called before removing the data
            //var subgrid_table_id;
            //subgrid_table_id = subgrid_id+"_t";
            //jQuery("#"+subgrid_table_id).remove();
        }

Once we add value from Pop Up it goes to Interest tab for respective row of main grid and that added value should be removed from pop up.

Currently value gets added successfully but it stays there in pop up, until we refresh the main form.

Is there any way to reload add pop up after submitting ?

Appreciate your time, 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-12T20:27:42+00:00Added an answer on June 12, 2026 at 8:27 pm

    Probably the problem could be solved if you would set HTTP header "Cache-Control: private, max-age=0" (see here and here) in the response of dataUrl. If you use ASP.NET I would recommend you to read the answer.

    Alternatively you can use the option

    ajaxSelectOptions: { cache: false }
    

    (see the answer).

    If all above will not help, you can use ajaxSelectOptions.data as function which would allow you sure send different values of ShopID parameter of dataUrl. See the answer for more details.

    UPDATED: I would recommend you additionally to use recreateForm: true option of Add and Edit forms. See here an example of the usage.

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

Sidebar

Related Questions

I am using jqgrid, and added one subgrid inside it, which looks like as
Action buttons are added to jqGrid columns using colmodel below. Column width 45 is
I am using jqGrid with treeGrid. I have added a filterToolbar. I would like
Select element is added to jqgrid column using code below. If cursor is over
I am using a jqGrid that has allot of columns to it. I added
jqGrid add forms contains autocomplete boxes using code below. If new row is added
I'm using jqGrid 4.2 with the filterToolbar , which works great. I'd like to
I'm using jqgrid on clienside for a financial web app where rows get added
I'm using jqGrid with inlineNav so that users can edit/add/delete rows locally and then
I am using jqGrid v3.8.1 and having trouble passing extra parameters with the predefined

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.