开发者

ExtJS Fieldset Collapse issue

开发者 https://www.devze.com 2023-02-24 16:41 出处:网络
I have designed Fieldset and checkboxtoggled set to true,My requirement is click on check box(unchec开发者_Go百科k) of fieldset, Hide some controls in fieldset, again check on checkbox show all contro

I have designed Fieldset and checkboxtoggled set to true,My requirement is click on check box(unchec开发者_Go百科k) of fieldset, Hide some controls in fieldset, again check on checkbox show all controls (need not to collapse fieldset when click on checkbox).

What is the right way to handle this?

(I am using collapse/expand listeners for fieldset, but unable to achieve it)


You can use the beforecollapse & beforeexpand event to override the default behavior. Here is what you can do:

 listeners: {
    'beforecollapse' :  function(panel,ani) {
        // Hide all the form fields you need to hide 
        return false; // this will avoid collapse of the field set
    },
    'beforeexpand' : function(panel,ani) {
        // Display all the fields
        return false; // this will avoid the default expand behaviour
    }   
 }
0

精彩评论

暂无评论...
验证码 换一张
取 消