How i can create ExtJs grid panel with checkboxes like here.
Asked
Active
Viewed 6.2k times
2 Answers
50
In Ext 3.4, you'll want to use the Ext.grid.CheckColumn
plugin as demonstrated in the EditorGrid sample included in the framework download.
In Ext 4+ there is a CheckColumn type built-in (xtype: 'checkcolumn'
).
Here's an example of what the column config looks like for a checkbox column in version 4+:
xtype: 'checkcolumn',
header: 'Active?',
dataIndex: 'active', // model property to bind to
width: 60,
editor: {
xtype: 'checkbox',
cls: 'x-grid-checkheader-editor'
}

M.A.K. Ripon
- 2,070
- 3
- 29
- 47

Brian Moeskau
- 20,103
- 8
- 71
- 73
-
It works for me, but I can not check any row. Also the link seems to be broken again. – Roberto Rodriguez Jul 05 '16 at 02:02
-
Ugh. I wish the Sencha folks would learn about 301 redirects... Fixed again, for now. – Brian Moeskau Jul 13 '16 at 17:42
-
This is not true. In Ext 4.1 there is no checkcolumn – Oliver Watkins Oct 07 '16 at 16:35
-
@OliverWatkins Here is a link to the CheckColumn docs in Ext 4.1: http://docs.sencha.com/extjs/4.1.3/#!/api/Ext.ux.CheckColumn - Thanks for the downvote! – Brian Moeskau Oct 07 '16 at 16:40
3
How about using this?
var checkBoxSelMod = new Ext.grid.CheckboxSelectionModel();
:-D
You can switch position of check box by placing the selection model object at desired position in the column list. This will allow you to place multiple checkboxes in the grid.

Varun Achar
- 14,781
- 7
- 57
- 74
-
-
For e.g., if you want it in the 3 column, then put checkBoxSelModel in the 3rd position in the cols attribute. – Varun Achar Jan 08 '12 at 06:43