EXT JS 4: TWO WAYS TO CONFIGURE SELECTION MODEL IN GRID
There are two ways to configure the selection model on the grid. The two configuration options are selModel and selType. Below is an example of using both. Note, the configurations that I put in are just for demonstrations purposes, not necessarily recommended.
Example 1 – selType
This only uses configuration to set up the selection model. If using all the default configs for the selection model, the configuration options in selModel are not needed.
This only uses configuration to set up the selection model. If using all the default configs for the selection model, the configuration options in selModel are not needed.
1
2
3
4
5
6
7
8
9
10
11
12
13
| { xtype: 'grid' , title: 'My Grid' , store: myStore //configured elsewhere selType: 'checkboxmodel' , selModel: { checkOnly: true , injectCheckbox: 1 } columns: [ // configure columns here ] } |
Example 2 – selModel
This creates the selection model and only uses selModel.
This creates the selection model and only uses selModel.
1
2
3
4
5
6
7
8
9
10
11
12
| { xtype: 'grid' , title: 'My Grid' , store: myStore //configured elsewhere selModel: Ext.create('Ext.selection.CheckboxModel, { checkOnly: true , injectCheckbox: 1 }), columns: [ // configure columns here ] } |
Versions: Ext JS 4.1.1
VyprasWfisru Matt Mueller https://wakelet.com/wake/5pV0E8-VphoJJox1pZdky
ReplyDeletedephopilsblos
Uincrestercchi Kim Romero https://www.aptiservices.com/profile/faryckaalbyrtyna/profile
ReplyDeletestochorileth