Results 1 to 5 of 5

Thread: grid layout

  1. #1
    Ext User
    Join Date
    Mar 2010
    Posts
    48

    Default grid layout

    Hi...


    How to insert the grid layout inside the tabslayout which is in 'center' region.... in the below code...
    plz help me in this...

    here is my code:


    Ext
    .ns('test');

    test
    .app =function(){


    return{

    init
    :function(){

    var viewport =new Ext.Viewport({

    layout
    :'border',

    items
    :[{

    region
    :'north',

    html
    :'North',

    xtype
    :'panel',

    height
    :100,

    split
    :'true'

    },{

    region
    :'west',

    layout
    :'accordion',

    width
    :300,

    items
    :[{

    title
    :'pannel1',
    autoLoad
    :'sw.txt'

    },{
    title
    :'pannel2',
    autoLoad
    :'dsa.txt'}]


    },{

    region
    :'center',

    xtype
    :'tabpanel',
    activeTab
    :1,

    items
    :[{
    title
    :'SW',
    autoLoad
    :'sw.txt'

    },{

    title
    :'oops',
    autoLoad
    :'oops.txt'
    },{

    title
    :'dsa',

    autoLoad
    :'dsa.txt',

    }]

    },{

    region
    :'east',

    xtype
    :'panel',

    html
    :'east',

    split
    :'true',

    width
    :200


    },{

    region
    :'south',

    xtype
    :'panel',

    html
    :'south',

    split
    :'true',

    height
    :100

    }]});

    return
    viewport
    }

    };

    }();






    Kind Regards
    leela

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    So you want to add a grid as one of the items of the tabpanel?

    Use:
    Code:
    var tabPanel = Ext.getCmp('id-of-tabpanel');
    tabPanel.add(grid);
    tabPanel.setActiveTab(grid);

  3. #3
    Ext User
    Join Date
    Mar 2010
    Posts
    48

    Default

    thanks for your reply...
    but I dont know where I have insert....


    can you plz modify the code and send me...

    plz do this needfull
    Kind Regards
    leela

  4. #4
    Ext User
    Join Date
    Mar 2010
    Posts
    48

    Default

    thanks for your reply...
    but I dont know where I have insert....


    can you plz modify the code and send me...

    plz do this needfull[/QUOTE]
    Kind Regards
    leela

  5. #5
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,245

    Default

    Why not simply include the grid as one of the items?

    Code:
    {
      region: 'center',
      items: [{
        ...
      },{
        title: 'My grid',
        xtype: 'grid',
        store: ['One', 'Two', 'Three'],
        columns: [{dataIndex: 'field1', header: 'Number'}]
      },{
        ...
      }]
    }

Posting Permissions

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