Sharon Watinsan
Sharon Watinsan

Reputation: 9850

Adding a Panel in a tab panel

I am trying to display a grid but add a panel in between List of customers and the columns Customer Id, active, firstname last name, email address.

I need to add a panel between these 2 componants. And in that panel i will be having different UI elements. How can i do this ?

enter image description here

Upvotes: 0

Views: 558

Answers (2)

nkuhta
nkuhta

Reputation: 11148

I need to add panel, with title "List if Customers" and vertical layout. In it you need to add two items: your new panel, and that grid (without title). There you will get what yout want.

{
  xtype: 'panel',
   layout: {
      type:"vbox",
      pack:"start",
      align:"stretch"}
   title:"List of Customers",
   items: [ ... your new panel and grid .. ] 
}

Upvotes: 1

nscrob
nscrob

Reputation: 4503

Well I believe you have just a grid with The title list of costumers, The easiest way is to have a panel and a grid (grid with no title) into another panel with the title.

{
  xtype: 'panel',
  title: 'List of customers',
  layout:'border',
  items: [
      {
         //the panel you want
         xtype: 'panel',
         region: 'north',
         height: 100,
      },
      {
          //your current grid without a title
          xtype: 'gridpanel',
          region: 'center',
          height: 300,
      }
  ]
}

Upvotes: 2

Related Questions