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

  • Home
  • SEARCH
  • 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 7622111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:22:11+00:00 2026-05-31T04:22:11+00:00

Pressing search button in jqgrid toolbar opens advanced search window. Pressing enter key does

  • 0

Pressing search button in jqgrid toolbar opens advanced search window.
Pressing enter key does not start seach. To start search, search button needs to be clicked.

How to allow enter key press to start search like in clicking in search button ?

  • 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-31T04:22:12+00:00Added an answer on May 31, 2026 at 4:22 am

    To implement search on Enter key one have to implement binding to keydown event to any input fields and force searching on Enter. If you include jQuery UI jquery-ui.min.js then you can use $.ui.keyCode.ENTER instead of 13 for the better readability of the code.

    The code can be like

    $.extend($.jgrid.search, {
        // ... some other default which you use
        afterRedraw: function (p) {
            var $form = $(this), formId = this.id, // fbox_list
                bindKeydown = function () {
                    $form.find("td.data>.input-elm").keydown(function (e) {
                        if (e.which === $.ui.keyCode.ENTER) {
                            $(e.target).change();
                            $("#" + $.jgrid.jqID(formId) + "_search").click();
                        }
                    });
                },
                oldOnChange = p.onChange,
                myOnChange = function (param) {
                    var $input = $form.find("td.data>.input-elm"), events;
                    oldOnChange.call(this, param);
                    if ($input.length > 0) {
                        events = $._data($input[0], "events");
                        if (events && !events.keydown) {
                            bindKeydown();
                        }
                    }
                };
            p.onChange = myOnChange;
            bindKeydown.call(this);
        }
    });
    

    The demo demonstrate the code live.

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

Sidebar

Related Questions

I am using following code to start activity when user pressing search button on
Well I am trying to submit a form by pressing enter but not displaying
I am wondering if it is possible with JqGrid advanced search to display multiple
in SO you can search for tags without pressing enter. i want to know:
Possible Duplicate: Bind textbox to 'enter' key I have a search text box. I
I want my application to be opened by long-pressing search button, but I want
The code below does not highlight the search term when it is found. In
Pressing enter inside a textbox refreshes the whole page in Google Chrome. please help
How can you open windows program by pressing a button on web page I
when we press a key and keep pressing it the keypress and keydown event

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.