PDA

View Full Version : Change event for checkbox is not working



webfriend13
17 Jan 2013, 3:21 AM
Hi All,

I have created a split button which has 4 check box in it, Now i have added change event for these check box which is not working. I am sure I am not attaching the event in the correct manner. Please suggest.

View:



{
xtype: 'splitbutton',
text: 'Options',
id: 'includeBtn',
menu: [{ text: 'Row', checked: false, id: 'rowChkBox'},
{ text: 'Column', checked: false, id: 'columnChkBox' },
{ text: 'RowOne', checked: false, id: 'rowOneChkBox' },
{ text: 'ColumnOne', checked: true, id: 'columnOneChkBox' }]
},


Controller:



init: function () {
this.control({
'myView #rowChkBox': {
change: this.onrowChkBoxClick
},
'myView #columnChkBox': {
change: this.oncolumnChkBoxClick
},
'myView #rowOneChkBox': {
change: this.onrowOneChkBoxClick
},
'myView #columnOneChkBox': {
change: this.oncolumnOneChkBoxClick
}
});
},

friend
17 Jan 2013, 5:33 AM
The default child components of Ext.button.Split are of type Ext.menu.CheckItem (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.menu.CheckItem). A CheckItem component supports the checkchange (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.menu.CheckItem-event-checkchange) event.

webfriend13
17 Jan 2013, 7:07 PM
Thank you Friend !!! =D>