1. #1
    Ext User
    Join Date
    Apr 2007
    Posts
    30
    Vote Rating
    0
    kohwuyea is on a distinguished road

      0  

    Default how to dynamic insert filed items to columnLayout on Formpanel

    hi, everyone, please spend some time to check following screen shot:

    when I add plus, I will insert a TextField into column on Formpanel, I could insert it when not column, but how to do on column, I could code for the following screen shot that support for dynamic insert textField, it will get the form items position, for example

    var formpanel = new Ext.formPanel({...});

    var field = new Ext.form.TextField({...});

    formpanel.add(field);

    var addfield = new Ext.form.TextField({...});

    for(var i=0; i<formpanel.items.items.length;i++){
    if(formpanel.items.items[i] == field){
    formpanel.insert(i+1,addfield); //insert position
    }
    }

    formpanel.doLayout();


    but how to do on ColumnLayout, I will give the screenshot for ColumnLayout, thanks.

    thanks a lot
    Attached Images
    Last edited by kohwuyea; 2 Jun 2008 at 7:24 AM. Reason: add message

  2. #2
    Ext User
    Join Date
    Apr 2007
    Posts
    30
    Vote Rating
    0
    kohwuyea is on a distinguished road

      0  

    Default

    how to insert TextField onto ColumnLayout, thanks.
    Attached Images

  3. #3
    Ext User
    Join Date
    Sep 2007
    Posts
    26
    Vote Rating
    0
    mortenscoobo is on a distinguished road

      0  

    Default

    i have the same problem

    how can i add a textfield to a columnlayout dynamic?

  4. #4
    Sencha User
    Join Date
    Mar 2011
    Posts
    5
    Vote Rating
    0
    thomaskee007 is on a distinguished road

      0  

    Default Code

    Could you show me the code for the extension you used? I'm trying to get the same effect with the '+' and '-' but didn't find yet how to do it. I know work with a button 'add' & 'remove' but it's not 100% what i need.

Thread Participants: 2