elnaz
11 Aug 2011, 1:29 PM
create selModel for grid inside of tab panel
I want to create selection Model for grid inside of tab panel ,but I don't know what should I do..
for grid panel I have this code and it's work :
initComponent: function() {
Ext.apply(this, { selModel: Ext.create('Ext.selection.CheckboxModel') });
this.callParent(arguments);
},
but for grid inside tab it doesn't work and I don't know How should it look like
here is some part pf my tab panel
extend: 'Ext.tab.Panel',
alias:'widget.relation',
width: 350,
border: true,
maxHeight:280,
bodyBorder: false,
fieldDefaults: {
labelWidth: 75,
msgTarget: 'side'
},
items: [{
title: 'Account',
xtype: 'container',
items:[{
align:'center',
xtype:'gridpanel',
store: 'StoreAccount',
columns: [
{header:'Method',dataIndex:'method', flex: 1,align:'center'},
{header:'Information',dataIndex:'info', flex: 1,align:'center'},
]
}]
},{
title: 'Activites',
xtype: 'container',
items:[{
align:'center',
xtype:'gridpanel',
store: 'StoreAccount',
columns: [
{header:'Method',dataIndex:'method', flex: 1,align:'center'},
{header:'Information',dataIndex:'info', flex: 1,align:'center'},
]
}]
I want to create selection Model for grid inside of tab panel ,but I don't know what should I do..
for grid panel I have this code and it's work :
initComponent: function() {
Ext.apply(this, { selModel: Ext.create('Ext.selection.CheckboxModel') });
this.callParent(arguments);
},
but for grid inside tab it doesn't work and I don't know How should it look like
here is some part pf my tab panel
extend: 'Ext.tab.Panel',
alias:'widget.relation',
width: 350,
border: true,
maxHeight:280,
bodyBorder: false,
fieldDefaults: {
labelWidth: 75,
msgTarget: 'side'
},
items: [{
title: 'Account',
xtype: 'container',
items:[{
align:'center',
xtype:'gridpanel',
store: 'StoreAccount',
columns: [
{header:'Method',dataIndex:'method', flex: 1,align:'center'},
{header:'Information',dataIndex:'info', flex: 1,align:'center'},
]
}]
},{
title: 'Activites',
xtype: 'container',
items:[{
align:'center',
xtype:'gridpanel',
store: 'StoreAccount',
columns: [
{header:'Method',dataIndex:'method', flex: 1,align:'center'},
{header:'Information',dataIndex:'info', flex: 1,align:'center'},
]
}]