Guest User

Untitled

a guest
Feb 20th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                 directiontypes = Ext.create('Ext.data.Store', {
  2.                 fields: ['value', 'name'],
  3.                 data : [
  4.                     {'value': 1, 'name': 'Аренду'},
  5.                     {'value': 2, 'name': 'Продажу'}
  6.                 ]
  7.         });
  8.            
  9.         var directioncombox = Ext.create('Ext.form.ComboBox', {
  10.             fieldLabel: 'Под',
  11.             store:  directiontypes,
  12.             listeners:{select:{fn:function(combo, value) {
  13.                 Ext.get('directiontypes-id').set({value: value[0].data.value})
  14.             }}},
  15.             editable: false,   
  16.             inputId: 'directiontypes-id',
  17.             displayField: 'name',
  18.             valueField: 'id',
  19.             name: 'direction_id',
  20.             xtype:'combo',
  21.             allowBlank: false,
  22.             triggerAction:'all',
  23.             width: 720,
  24.         })
  25.         directioncombox.setValue(directiontypes.findRecord('value', '1'))
Add Comment
Please, Sign In to add comment