PDA

View Full Version : How to get dynamically created panel item values on button click...



prabhuthbs
10 Dec 2013, 3:33 PM
var fileBtn = new Ext.Button({text : 'File',handler : myBtnHandler});var editBtn = new Ext.Button({text : 'Edit',handler : myBtnHandler});var myTopToolbar = new Ext.Toolbar({items : [ fileBtn,editBtn]}); var tab = tabPanel.add(Ext.widget('panel', { title: 'Build Cron',width: 200,bodyPadding: 10,renderTo: Ext.getBody(),tbar : myTopToolbar, items:[{xtype: 'combobox',margin: 4,fieldLabel:'Seconds', itemId: 'second', allowBlank: false, store:secondStore,valueField: 'storeValue',displayField: 'displayValue',forceSelection: true,typeAhead: true,triggerAction: 'all',selectOnFocus: true,editable: true,queryMode: 'local',lastQuery: '' }]}));var myBtnHandler = function(btn) { // I need Combo box selected values here };

slemmon
13 Jan 2014, 10:13 AM
You're just looking to get the value from the combobox on button click, is that correct?

Also, what version of ExtJS are you working with?