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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:55:03+00:00 2026-05-28T15:55:03+00:00

Hy, In my application I am using JQGrid tool for displaying the lists. I

  • 0

Hy,

In my application I am using JQGrid tool for displaying the lists.

I need to show context menu on both left and right click (my client choice…). Is this possible?

For displaying the context menu on right click I am using the loadComplete function like this:

loadComplete: function () {
        $("tr.jqgrow", this).contextMenu('contextMenu', {
                bindings: {...},
                onContextMenu: function (event) {...}
            });
        },

and it’s working fine.

For displaying the context menu on left click I’ve tried the beforeSelectRow function:

beforeSelectRow: function (rowid, e){
        $("tr.jqgrow", this).contextMenu('contextMenu', {
                bindings: {...},
                onContextMenu: function (event) {...}
            });
        },

but it’s not working!

Does anyone have any idea how can I show the context menu at left-click on the row (or maybe selecting the row, it’s the same)?

Thanks in advance,

Jeff

  • 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-28T15:55:05+00:00Added an answer on May 28, 2026 at 3:55 pm

    I suggest that you just bind click event to the same event handler defined in the jquery.contextmenu.js. To do this you can use the following code

    var cmenu = $grid.data('events').contextmenu;
    if (cmenu && cmenu.length > 0) {
        $grid.click(cmenu[0].handler);
    }
    

    I use the fixed version of jquery.contextmenu.js which now a part of jqGrid (see my suggestions here). So I bound contextMenu not to every grid row, but to the grid element directly.

    The demo shows that the above approach works. If you use additional bindings to contextmenu event you can improve the code above to choose the correct event handler cmenu[i].handler.

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

Sidebar

Related Questions

My client side application is using jqgrid that requests the server side, which in
In my application I use JQGrid for listing some contacts. I need to show
I am writing an application using labview and need to use external code. I
Hai i developed a application using broadcast receiver.I need to wake my Application always.so
Hi i am using the jqgrid in my struts2 hibernate application. I got all
i am developing an application using c#.net in which i need that if a
I am using jqgrid throughout my application. On two screens with inline edit, everything
In my rails application ,iam using jqgrid to enter data in rows.there is a
I am following Phil Haacks tutorial on using JQGrid with ASP.Net MVC. My application
I have a C# application using C++ COM object both build on a 32

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.