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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:17:45+00:00 2026-05-28T02:17:45+00:00

In jqgrid when I hover the mouse on any row it highlights the row.

  • 0

In jqgrid when I hover the mouse on any row it highlights the row. But when I use context enu, the highlighted style is gone for that row.

Now users are not aware which row was the context menu opened for. I would like to know if we can retain the hovered style. I know we can do setSelect on the grid for the selected row, but I don’t want to select the row. Thanks in advance…

  • 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-28T02:17:45+00:00Added an answer on May 28, 2026 at 2:17 am

    I suggest that you use mouseover and mouseleave (or the jQuery.hover event which is the same) to set the ui-state-hover class on the row on which the context menu will be opened. In the way you can fix the behavior from the standard

    enter image description here

    to the following:

    enter image description here

    The demo demonstrate my suggestion live. The corresponding code I included below:

    $grid.contextMenu('myMenu1', {
        bindings: {
            edit: function (trigger, currentTarget) {
                $(trigger).jqGrid('editRow',
                    $(currentTarget).closest("tr.jqgrow").attr('id'),
                    true);
            },
            del: function (trigger, currentTarget) {
                $(trigger).jqGrid('delGridRow',
                    $(currentTarget).closest("tr.jqgrow").attr('id'));
            }
        },
        menuStyle: {
            backgroundColor: '#fcfdfd',
            border: '1px solid #a6c9e2',
            maxWidth: '600px',
            width: '100%'
        },
        itemHoverStyle: {
            border: '1px solid #79b7e7',
            color: '#1d5987',
            backgroundColor: '#d0e5f5'
        },
        onShowMenu: function (e, $menu) {
            var $row = $(e.target).closest('tr.jqgrow');
            $menu.mouseover(function () {
                try {
                    $row.siblings().removeClass('ui-state-hover');
                } catch (e) {}
                $row.addClass('ui-state-hover');
            }).mouseleave(function (e) {
                var $rowNew = $(e.target).closest('tr.jqgrow');
                if ($rowNew.attr('id') !== $row.attr('id')) {
                    $row.removeClass('ui-state-hover');
                }
            });
            return $menu;
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My jqGrid that does a great job of pulling data from my database, but
How can you set the tool tip that appears when you hover your mouse
I've setup a jqGrid like this $('#gridTable').jqGrid({ url: '/GridData/', ... Now if I navigate
I'm trying to create a jqgrid, but the table is empty. The table renders,
JQgrid outputs this html for a left aligned cell - but it is too
I am using jqGrid to render some data. Now I want the ability to
Our jqGrid is working well - if we return > 1 row everything works.
Is there a jqGrid method that will skip to the next/prev page of rows.
I have a jqGrid on an ASP.Net MVC view. I want to use to
I have a jqgrid that's functionning very well. I was wondering is it possible

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.