I created one panel. I added one checkbox in that panel. I need to check whether that checkbox selected or not from outside function. Please any one help me....
this.currentManagerPanel = new Ext.Panel({
border: false,
width: 550,
layout: 'fit',
items: [{
xtype: 'checkbox',
name: 'isNewEmployee',
height: 20,
boxLabel: 'Is New Employee',
inputValue: ''
}]
});
I created one panel. I added one checkbox in that panel. I need to check whether that checkbox selected or not from outside function. Please any one help me....
this.currentManagerPanel = new Ext.Panel({
border: false,
width: 550,
layout: 'fit',
items: [{
xtype: 'checkbox',
name: 'isNewEmployee',
height: 20,
boxLabel: 'Is New Employee',
inputValue: ''
}]
});
Share
Improve this question
edited Aug 22, 2013 at 22:58
Darin Kolev
3,40913 gold badges33 silver badges47 bronze badges
asked Jan 10, 2012 at 12:34
user007user007
6433 gold badges10 silver badges19 bronze badges
1
- I got the answer. I changed instead of name property i provided id property and then i can read the value using Ext.getCmp("isNewEmployee").checked; Now it will return checkbox selected or not.. – user007 Commented Jan 10, 2012 at 13:03
2 Answers
Reset to default 3using Ext.getCmp("isNewEmployee").checked;
Place this code in your controller.js
:
var form = win.down('form');
var allFields = form.getForm().getFieldValues();
var value = form.getForm().findField('isNewEmployee').getValue();
// This will return True or False