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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:38:27+00:00 2026-05-25T06:38:27+00:00

I had these working great as navgrid settings like follows: this.Grid.navGrid(‘#’ + this.PagerId, {},

  • 0

I had these working great as navgrid settings like follows:

this.Grid.navGrid('#' + this.PagerId, {}, {}, {}, {},
{         
    closeAfterSearch: true,
    closeAfterReset: true,
    closeOnEscape: true      
});

but I would like them to be set as defaults.

I tried:

  • $.extend($.jgrid.defaults, { search : { closeAfterReset: true } });
  • $.extend($.jgrid.search, { closeAfterReset: true } );

…and neither seem to be working. Any tips?

EDIT:

Here is my code as @Oleg suggested – still not working:

$.extend($.jgrid.search, {    
            closeAfterSearch: true,
            closeAfterReset: true,
            closeOnEscape: true,
            beforeShowSearch: function ($form) {
            ...
            },
            onClose: function (searchBoxId) {
             ...
            },
            Reset: "Clear Filter",
            Find: "Filter Grid"
        });

According to the single_searching article on the jqgrid wiki, search options are set here, which is why I did my original code:

<script>
...
jQuery("#grid_id").jqGrid({
 ...
pager : '#gridpager',
...
}).navGrid('#gridpager',{view:true, del:false}, 
{}, //  default settings for edit
{}, //  default settings for add
{},  // delete instead that del:false we need this
{search_options}, // search options  
{} /* view parameters*/
);
...
</script>

The funny thing to me is that my onClose and beforeShowSearch events are being hit, but the properties are having now affect…

  • 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-25T06:38:28+00:00Added an answer on May 25, 2026 at 6:38 am

    The default searching settings should be set by

    $.extend($.jgrid.search,
        {closeAfterSearch: true, closeAfterReset: true, closeOnEscape: true});
    

    I don’t tested exactly such settings, but my standard settings

    $.extend(
        $.jgrid.search,
        {
            multipleSearch: true,
            multipleGroup: true,
            recreateFilter: true,
            closeOnEscape: true,
            overlay: 0
        }
    );
    

    work perfect.

    It should be executed after jqGrid js-files and before the navGrid call. The syntax this.Grid.navGrid which you use seems me a little strange.

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

Sidebar

Related Questions

I have this php login system, I had it working great on localhost, I
Ok, so this is really confusing me now, because I had this working a
I've had this working before, but now it's not working and I've been tearing
a while back, CNET had these really cool Social Share buttons, that when you
i am facing a new situation. I know someone definitely had faced these type
I just had the jQuery epiphany the other day and still feel like there
I had this doubt for sometime now, some people say that there's no such
I've got a working regular expression, but I'd like to make it a tad
I have a remote git server that has been working great for months. Earlier
My app was working great and then client asked to put a login screen

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.