FormPanel Items count

  1. #1

    FormPanel Items count

    Hi.
    I need to get the total elements in a formpanel and then i need to disable each object contained on it
    im creating the items of the formpanel just in runtime and i dont know the element name or element id.
    my idea is to get the total of the elements of the formpanel and then make a for sentence to disable by index each of the item elments

    Im working on client side (javascript)

    i have something like this


    ar f = Ext.getCmp('FormPanel1');
    alert('aa:' + f.Items.count); <--- this causes and error

    and i am thinking some like this

    ar f = Ext.getCmp('FormPanel1');
    total = f.Items.count <--or similar funcion
    for (var i = 0; i < total; i++) {
    f.items.item[i].disable();
    }

    can someone help me?

    Thanks
  2. #2
    Hello!

    Please, take a look at this method http://docs.sencha.com/ext-js/4-1/#!...thod-getFields

Similar Threads

  1. Replies: 7
    Last Post: Jul 25, 2012, 5:34 PM
  2. Replies: 0
    Last Post: Oct 25, 2011, 10:02 AM
  3. [CLOSED] [1.0] Tabstrip with dynamicly created items - items.count always 0
    By klaus.schwarz in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jul 07, 2010, 11:40 AM
  4. [1.0] MultiCombo how to return items.count
    By steve.redmon in forum 1.x Help
    Replies: 0
    Last Post: Jun 11, 2010, 9:51 PM
  5. Count items in a ComboBox?
    By Tbaseflug in forum 1.x Help
    Replies: 1
    Last Post: Nov 18, 2009, 11:25 AM

Tags for this Thread

Posting Permissions