ASP.NET: GridView Context Menu (What's new in 14.1)

12 May 2014

The DevExpress ASP.NET GridView just got a great new feature: A context menu!

DevExpress ASP.NET GridView Context Menu

A contextual menu is a menu that appears when you right-click on an application.

A context menu offers a limited set of choices that are available in the current state, or context, of the operating system or application. Usually the available choices are actions related to the selected object. - Wikipedia

I love a good context menu. A good one context menu is one that offers a small set of choices that helps the end-user with common actions.

And we've added several useful context menus to the DevExpress ASP.NET GridView control: ASPxGridView.

Contextual Context?

A good context menu is contextual. Which means that you get a different context menu depending on the object/area you right-click on.

Take a look at these screenshots of the different types of context menus available in the ASPxGridView:

For example, right-clicking on the footer let's you dynamically create a summary! See that SUM in the footer for UnitPrice? I created that using the context menu.

DevExpress ASP.NET GridView Context Menu - Summary Footer

Right-clicking on the GroupRow gives you the following menu that allows your end-users to expand, collapse, clear grouping, or hide the GroupBy box:

DevExpress ASP.NET GridView Context Menu - Group Row

Right-clicking on a data row displays this menu which let's you go into edit mode or even export the Grid's contents:

DevExpress ASP.NET GridView Context Menu - Data Row

The export menu items in the image above are custom menu items that were added using the new ASPxGridView.FillContextMenuItems event handler. Not only does this event handler default DevExpress items but you can add your custom items easily and customize it visibility on the ContextMenuItemVisibility event. Stay tuned for the release and demo source code to see how easy it is to customize and create your own custom menu items on the slick new ASPxGridView context menu.

UI Superhero

With all these great features in the DevExpress ASP.NET GridView, your end-users feel smart and powerful because they now have even more options to control the Grid. You will be the UI Superhero. :)

WebForms and MVC!

The slick new context menu is available in both the ASP.NET WebForms and MVC versions of the DevExpress GridView control.

Your Next Great .NET App Starts Here

Year after year, .NET developers such as yourself consistently vote DevExpress products #1.

Experience the DevExpress difference for yourself and download a free 30-day trial of all our products today: (free support is included during your evaluation).

10 comment(s)
Brendon Muck [DevExpress MVP]

How does this work with the browser's default context menu? I've seen instances where an ASP.NET-app menu is displayed behind the browser context menu and is never really accessible.

12 May, 2014
Mehul Harry (DevExpress)


The ASPxGridView will prevent the default browser context menu from displaying when you right-click on the ASPxGridView's areas.

12 May, 2014
Peter Thorpe

Excellent addition this will let me remove a lot custom functionality I added to let end users customize grids.

My only concern is discoverability of right click menus on the web.

13 May, 2014
Edilson Junior

Fantastic!!! Can't wait to have it!!!

13 May, 2014
Mehul Harry (DevExpress)

Peter, thanks.

As for discoverability, yes, that can be an issue but that's why you don't want to put the key functions that they might do there. You could initially educate your users with some kind of popup or just some information panel I suppose.

13 May, 2014
Dennis (DevExpress Support)

BTW, this functionality is enabled in XAF ASP.NET apps by default:

You can find more screenshots in the corresponding suggestion in the Support Center.

13 May, 2014
Shawn Oles (Strata)

I love this idea.  We already have a custom context menu with out grids.  Will there be a way to customize this context menu so we can add our own actions?

Also, sometimes when users right click, they want to access the browsers context menu.  I used a couple of tools that also offer a "Hide Menu" in the custom context, when you click this, it will hide the context menu, and next right click will show the IE context menu.  This works great in those cases were users occasionally need to use that embedded IE/Chrome context menu (copy/paste etc...).

13 May, 2014
Mehul Harry (DevExpress)

Thanks Shawn.

Yes, there will be a way to add custom menu items.

As for the default browser menu, it's still there when you right click on an area that is not on the ASPxGridView. :)

13 May, 2014
Mehul Harry (DevExpress)

Dennis, Nice!

13 May, 2014
James Zhong

Thanks for this improvement!

13 July, 2014

Please login or register to post comments.