View Full Version : how to add listeners to check box?

27 Nov 2012, 10:12 PM
Hi All, I'm using 'on' function to add listeners to the check box.
like Ext.getCmp('checkBox').on('eventName',fun,this)
but I dont know what eventName is when check box is checked or unchecked.
and what if my event handler has args,how shuould i pass args to the handler?

28 Nov 2012, 12:34 AM
The checkbox field has change (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.form.field.Checkbox-event-change) for it and if you have a checkbox in a grid, tree or menu you can use checkchange (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.ux.CheckColumn-event-checkchange).