O'Reilly logo

Learning Ext JS 4 by Armando Gonzalez, Crysfel Villa

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

Selection models

Once we have defined the way we want to display our data, we need the tools to interact with it. That's where the selection models are needed. The grid panels use selection models for selecting some part of the grid's data. There are two main selection models on the framework, the Ext.selection.RowModel model, where an entire row of the grid is selected, or the Ext.selection.CellModel model, where individuals cells are selected.

By default, the grid panel uses the row selection model that selects all the rows of our grid. In our example we are going to use the RowSelectionModel class to get the record we are going to edit or delete.

{ xtype:'actioncolumn', width:40, items:[{ icon:'pencil.png', handler:function (grid, rowIndex, colIndex) ...

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