PDA

View Full Version : Ext Js 4.1 How to get selected records text from combo box?



mandardadpe
26 Nov 2012, 9:42 PM
Hi,
I have combo box which contains list of projects. I want "text" of selected record.
I used this:
alert(Ext.getCmp('comboMasterEast').getValue());
but gives me its ID ,instead of that I need "text".
What should I do for this ?

Thanking You in advance
Mandar Dadpe

mandardadpe
26 Nov 2012, 9:47 PM
I got the solution, by using following:

var store = Ext.getCmp('comboMasterEast').getStore();
var record = store.getById(comboMasterEast.getValue());
alert(record.get('name'));