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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:25:41+00:00 2026-06-10T06:25:41+00:00

Below is my code, and I need to close the add/edit dialog after a

  • 0

Below is my code, and I need to close the add/edit dialog after a submit. It’s updating the server and reloading the grid in both the cases, but it is not closing the dialog:

jQuery("#toolbar1").jqGrid({
     url:'category/getcategorylist',
     datatype: "xml",
     colNames:["Name","Description","Id"],
     colModel:[
         {name:"cname",index:"cname",editable:true, width:250, align:"center",xmlmap:"categoryName"},
         {name:"cdescription",index:"cdescription", editable:true,width:300, align:"center",xmlmap:"description"},
         {name:"id",index:"id", editable:true,width:210, align:"center",xmlmap:"categoryId",key: true,hidden: true},
     ],
     rowNum:100,
     viewrecords: true,
     toppager:true,
     height:250,
     width:800,
     modal:true,
     sortorder: "asc",
     xmlReader: {
        root : "CategoryList",
        row: "categoryList",
        repeatitems: false
     },
});
$("#toolbar1").jqGrid("navGrid", "#toolbar1_toppager", {
     reloadAfterSubmit:true, view: false, search:false ,addtext: 'Add',
     edittext: 'Edit',
     deltext: 'Delete',
     refreshtext: 'Reload'
},
{url: "category/updatecategory"}, {url: "category/createcategory"}, {url:"category/deletecategory"});
  • 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-10T06:25:42+00:00Added an answer on June 10, 2026 at 6:25 am

    There are some properties for closing the dialog that needs to be set on your edit/add declarations, they normally default to false.

    For Adding:

    closeAfterAdd – when add mode, close the dialog after add record. (default: false)

    For Editing:

    closeAfterEdit – when in edit mode, close the dialog after editing. (default: false)

    So in your example you would need:

    {url: "category/updatecategory", closeAfterEdit: true}, 
    {url: "category/createcategory", closeAfterAdd: true}
    

    Or:

    $("#toolbar1").jqGrid("navGrid", "#toolbar1_toppager", {
         reloadAfterSubmit:true, view: false, search:false ,addtext: 'Add',
         edittext: 'Edit',
         deltext: 'Delete',
         refreshtext: 'Reload',
         closeAfterAdd: true,
         closeAfterEdit: true
    },
    

    These settings are available on the wiki

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

Sidebar

Related Questions

I have this code below. I need to use a class id instead of
Please i need help, this code below works fine on my localhost, php5.3+ but
I need to convert a sql statement to a linq query. The code below
Am not that skilled at Excel/VBA and need some help. The code below (in
In the code shown below, I need to manipulate the time var in python
In the code given below, I need to position the userid box in the
The code shows below what i have done till now. Now what i need
Hi need help getting repeated value from give array,below is the code which im
In the code snippet below, from my jQuery setup, I need to check if
I need the java code snippet for the below logic: Following is a 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.