1. #1
    Sencha User
    Join Date
    Aug 2011
    Location
    Ahmedabad
    Posts
    30
    Vote Rating
    0
    mayurbhuva is on a distinguished road

      0  

    Default Unanswered: how can i set border layout with grid panel

    Unanswered: how can i set border layout with grid panel


    hi,

    i am trying to build border layout with grid panel .

    Code:
    <html>
    <head>
        <title>Information</title>
        <link rel="stylesheet" type="text/css" href="../ext/resources/css/ext-all.css" />
        <script type="text/javascript" src="../ext/adapter/ext/ext-base.js"></script>
        <script type="text/javascript" src="../ext/ext-all-debug.js"></script>
        <script type="text/javascript" src="../ext/SearchField.js"></script>
        <script>
    	 Ext.onReady(function(){
    	var viewport = new Ext.Viewport({
    layout: 'border',
    renderTo: Ext.getBody(),
    items: [{
    region: 'north',
    xtype: 'panel',
    html: 'North'
    },{
    region: 'west',
    xtype: 'panel',
    split: true,
    collapsible: true,
    collapseMode: 'mini',
    title: 'Some Info',
    bodyStyle:'padding:5px;',
    width: 200,
    minSize: 200,
    html: 'West'
    },{
      region: 'center',
       xtype: 'tabpanel',
       activeTab: 0,
       items: [{
      title: 'Movie Grid',
       xtype: 'panel',
    }]
    /*height:'auto',
    layout:'fit',
    items:[{
    	   xtype:'panel',
    	   }]*/
    },{
    region: 'east',
    xtype: 'panel',
    split: true,
    width: 200,
    html: 'East'
    },{
    region: 'south',
    xtype: 'panel',
    html: 'South'
    }]
    });
     });
      </script>
    </head>
    <body>
    
    
    </body>
    </html>

    in this example in center i want to set grid panel how ?



  2. #2
    Sencha User
    Join Date
    May 2011
    Location
    Argentina
    Posts
    55
    Answers
    2
    Vote Rating
    3
    ferengidedalo is on a distinguished road

      0  

    Wink


    do you have a view with the gridpanel? or just want to define your gridpanel inside the center region declaration?

    you just need to change the xtype property to the name of your view or just to gridpanel...

    Code:
    {
               region: 'center',   
               xtype: 'tabpanel',   
               activeTab: 0,   
               items: [{  
                   title: 'Movie Grid',   
                   xtype: 'gridpanel'
               }]
    ]

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Location
    Ahmedabad
    Posts
    30
    Vote Rating
    0
    mayurbhuva is on a distinguished road

      0  

    Default for noit displaying output in border layout

    for noit displaying output in border layout


    thanks,

    but when i write this
    Code:
    {
               region: 'center',   
               xtype: 'tabpanel',   
               activeTab: 0,   
               items: [{  
                   title: 'Movie Grid',   
                   xtype: 'gridpanel'
               }]
    }
    its not display any output because of i write xtype: 'gridpanel'

    thanks,

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    17,003
    Answers
    464
    Vote Rating
    650
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    You need to configure it with all the appropriate grid options, columns/store. Go look at the grid examples and you'll see what options you need.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 2

Tags for this Thread