Results 1 to 4 of 4

Thread: how can i set border layout with grid panel

  1. #1
    Sencha User
    Join Date
    Aug 2011
    Location
    Ahmedabad
    Posts
    30
    Vote Rating
    0
      0  

    Default 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
      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
      0  

    Default 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
    18,392
    Answers
    650
    Vote Rating
    858
      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!

Tags for this Thread

Posting Permissions

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