We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

how to show context menu on left click?

This explains that how to display the context menu on a left click.

 

Solution:

We have achieved this using load event of ejGrid. In load event we have bind the click event to Grid and in this event, we have used showContextMenu method of ejMenu to display the context menu on Grid.

To display the context menu on pager we have bind the click event directly in pageSettings API using load event of ejGrid.

The following code example demonstrates how to show the context menu on a left click.

JS:

1. Render the Grid Control.

 

MVC:

 

ASP.NET:

 

ASP.NET CORE:

 

Angular:

 

TS File:

2. In AngularJS we bind the click event directly to the pageSettings API for show the context menu in pager.

 

JS:

3. In load event we have bind click event to the Grid element. In this click event we have taken ejMenu instance and we also able to get the target in the arguments of click event. Based on the target element we have display the appropriate context menu for the Grid header, content and Footer.

 

 

Result:

 

Article ID: Published Date: Last Revised Date: Platform: Control:
8919 07/06/2018 07/06/2018 JavaScript ejGrid
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.