Results 1 to 4 of 4

Thread: add a child under last child of a parent container

  1. #1

    Default

    Hello all, hope you all having some great days!

    I have a problem i cannot seem to resolve and hoping some of you can shed some light on this matter.

    to simplify it

    im dynamically adding columns with some form fields ,

    GROUP FIXED WHAT FROM 0 TILL 1000 PAYOUT X [add button]
    CHILD FIXED WHAT A 1001 2000 PAYOUT X [ del]
    CHILD FIXED WHAT B 2001 3000 PAYOUT X [del]
    GROUP FIXED OTHER FROM 0 TILL 1000 PAYOUT X [add button]
    ETC

    Now all works great , but now with the form while editing it , when i try to add a new row to lets say "group fixed "
    it will add it above A and not under B
    Offcourse its pretty logical that it does that as im adding it to the parent container
    i tried to get the count of the childs for the parent , and then -1 and add to that but then it will add it within the last child and not under it , also logically as it is in fact adding it to this child
    i was thinking to solution it with Ext.DomHelper.insertAfter(childelement, {configcode});
    to no avail. neither.

    if somebody knows how best to handle this would be most apreciated as im kind of stuck!
    thanks in advance

  2. #2

    Default

    Insert after does seem to insert it right but in the html i get all objects instead of the actual formfields

    ie
    Code:
    
    

    Code:
    Ext.DomHelper.insertAfter(  Ext.getCmp(getcountertabid).el,
                    { xtype:'textfield' , .......});

  3. #3

    Default

    Now i tried to with InsertAfter to create the div and then once created with add add the row to the div

    but now i can only access it with Ext.get offcourse and not Ext.getCmp and now add is not a function for this.........

    how can i register this id

    almost there ...

  4. #4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •