Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- directiontypes = Ext.create('Ext.data.Store', {
- fields: ['value', 'name'],
- data : [
- {'value': 1, 'name': 'Аренду'},
- {'value': 2, 'name': 'Продажу'}
- ]
- });
- var directioncombox = Ext.create('Ext.form.ComboBox', {
- fieldLabel: 'Под',
- store: directiontypes,
- listeners:{select:{fn:function(combo, value) {
- Ext.get('directiontypes-id').set({value: value[0].data.value})
- }}},
- editable: false,
- inputId: 'directiontypes-id',
- displayField: 'name',
- valueField: 'id',
- name: 'direction_id',
- xtype:'combo',
- allowBlank: false,
- triggerAction:'all',
- width: 720,
- })
- directioncombox.setValue(directiontypes.findRecord('value', '1'))
Add Comment
Please, Sign In to add comment