O'Reilly logo

Ext JS 4 Web Application Development Cookbook by Stuart Ashworth, Andrew Duncan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a context menu to grid rows

Context menus are a huge part of desktop computing: often, when we right-click on an object, we expect to see a list of actions that can be performed.

This recipe is going to explain how we can create a context menu that will be shown when the user right-clicks on a row, and that will allow them to instigate an action upon it.

Getting ready

We are going to use the Invoice example that we have used throughout this chapter, so we will start by including the Model and Store files to our HTML page:

<script type="text/javascript" src="invoices-model.js">
</script>
<script type="text/javascript" src="invoices-store.js">
</script>

How to do it...

  1. Our first step is to create a basic grid, such as the one we created in the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required