Hi,
I'm new to ext js. I've a severe requirement. I've two select dropdown boxes, _getSelectBox and getTestComboBox. These two boxes give two different lists. Initially, getTestComboBox is disabled. On click of any value of _getSelectBox I'll have to load value into getTestComboBox and enable getTestComboBox. How do I do this? I couldn't find any query related to this in the forum.
_getSelectBox: function(Data) {
var store = Ext.create('Ext.data.Store', {
fields: ['id', 'name', 'projectId', 'allInGroup']
});
store.loadData(Data);
return Ext.create('Ext.ux.form.field.NewSelectGroupBox', {
anchor: '75%',
minListWidth: 150,
flex: 1,
name: 'Types',
queryMode: 'local',
store: store,
matchFieldWidth: false,
triggerAction: 'all',
fieldLabel: _translate(" Group"),
labelWidth: this.labelWidth,
enableKeyEvents: true,
reorderable: false,
allInGroupField: 'allInGroup',
editable: false,
displayField: 'name',
valueField: 'id',
id: 'id',
checked: true,
emptyText: _translate("Choose group"),
multiSelect: true,
allInGroup: true,
listeners: {
change: this._onChange,
select: this._onChange,
scope: this
}
});
},
_onChange : function () {
this.getTestComboBox(this.store.testData).disabled = true;
},
getTestComboBox: function(testData) {
var store = Ext.create('Ext.data.Store', {
fields: ['id', 'name', 'allInGroup']
});
store.loadData(testData);
return Ext.create('Ext.ux.form.field.NewSelectGroupBox', {
anchor: '75%',
minListWidth: 150,
flex: 1,
name: 'testTypes',
queryMode: 'local',
store: store,
matchFieldWidth: false,
triggerAction: 'all',
fieldLabel: _translate("Select data"),
labelWidth: this.labelWidth,
enableKeyEvents: true,
reorderable: false,
allInGroupField: 'allInGroup',
editable: false,
displayField: 'name',
valueField: 'id',
id: 'elementId',
checked: true,
emptyText: _translate("Choose data"),
multiSelect: true,
allInGroup: true
});
},