TheRebelGriz
20 May 2007, 11:36 AM
Using Ext - 1.0.1a:
Given the following SimpleStore and ComboBox Definition:
var dAttrTYpes = [ ['DIVISION', 'Divisions'], ['STATE', 'State Attrs'],['MISC', 'Miscellaneous'] ];
var store = new Ext.data.SimpleStore({ fields: ['attr_type', 'description'], data: dAttrTYpes });
var cbAttrType = new Ext.form.ComboBox(
{ store: store
, label: 'Select Attr'
, displayField:'description'
, valueField: 'attr_type'
, typeAhead: true
, mode: 'local'
, triggerAction: 'all'
, emptyText:''
, selectOnFocus: true
, setEditable: false
}
);
How does one go about getting the DisplayedValue of the selectedItem ?
For Example:
1. A User selects 'State Attrs' in the comboBox.
2. I then need to show a MessageBox that shows the display value of the selected Item in the ComboBox..
cbAttrType.getValue() which returns ''STATE'' but I 'State Attrs' instead.
Any assistance is appreciated!
Thanks in Advance!!
Given the following SimpleStore and ComboBox Definition:
var dAttrTYpes = [ ['DIVISION', 'Divisions'], ['STATE', 'State Attrs'],['MISC', 'Miscellaneous'] ];
var store = new Ext.data.SimpleStore({ fields: ['attr_type', 'description'], data: dAttrTYpes });
var cbAttrType = new Ext.form.ComboBox(
{ store: store
, label: 'Select Attr'
, displayField:'description'
, valueField: 'attr_type'
, typeAhead: true
, mode: 'local'
, triggerAction: 'all'
, emptyText:''
, selectOnFocus: true
, setEditable: false
}
);
How does one go about getting the DisplayedValue of the selectedItem ?
For Example:
1. A User selects 'State Attrs' in the comboBox.
2. I then need to show a MessageBox that shows the display value of the selected Item in the ComboBox..
cbAttrType.getValue() which returns ''STATE'' but I 'State Attrs' instead.
Any assistance is appreciated!
Thanks in Advance!!