MNR MNR - 1 month ago 24
Javascript Question

Dynamically hiding controls in an ExtJS Fieldset

Is there any event to hide some controls in fieldset based on checkbox check/uncheck events

thanks in advance




sample code for (Listner of Fieldset )

listeners: {
collapse: function () {
//debugger;
if (Ext.getDom('chkWarrantyCover').checked == false) {
Ext.getCmp("WarrantyFieldset").expand();
Ext.getDom('chkWarrantyCover').checked = false
Ext.getDom('btnComEdit').style.visibility = "hidden";
Ext.getDom('btnEditPerson').style.visibility = "hidden";
}
else
Ext.getCmp("WarrantyFieldset").expand();
}
},

MNR MNR
Answer

I'm using "onCheckClick" event for fieldset:

Code:onCheckClick: function () {
    if (Ext.getDom('chkWarrantyCover').checked == true) {
        Ext.getDom('btnComEdit').style.visibility = "visible";
        Ext.getDom('btnEditPerson').style.visibility = "visible";
        Ext.getDom('btnEditNotify').style.visibility = "visible";
}
 else {
} 

Regards

Comments