Disable/enable all fields in a FormPanel

  1. #1

    Disable/enable all fields in a FormPanel

    Hi all,

    suppose we have a FormPanel with ID frm1.
    I know I can reset all fields calling the following method

    frm1.Reset()
    Is there a similar way to enable/disable all fields?

    Thanks
  2. #2
    Hi @miles,

    Welcome to the Ext.NET forums!

    You can disable all the fields using this JavaScript code.
    App.frm1.cascade(function(item) {
        item.disable(); 
    });
    Though, it might be better to disable the FormPanel itself.
    App.frm1.disable();
  3. #3
    Thanks Daniil,
    I actually disabled the FormPanel; as you say, it's a cleaner way.

    Just a question: cascade would be called recursively? (say, for example, you have a panel pnl2 inside the surrounding formPanel and items inside it).
  4. #4

Similar Threads

  1. [CLOSED] Enable/Disable Button
    By FVNoel in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 19, 2013, 12:02 PM
  2. [CLOSED] editable gridpanel enable/disable fields
    By schellappa in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 10, 2011, 7:17 PM
  3. [CLOSED] How to disable/enable all controls in formpanel
    By idrissb in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 13, 2009, 12:21 PM
  4. how to disable and enable combobox?
    By sadeque in forum 1.x Help
    Replies: 1
    Last Post: Jul 27, 2009, 5:00 AM
  5. Enable or disable the button
    By VietView in forum 1.x Help
    Replies: 4
    Last Post: Jan 09, 2009, 11:59 AM

Tags for this Thread

Posting Permissions