2015-05-20 3 views
0

Я пытаюсь создать сетку в представлении, но заголовки столбцов над заголовком, и я не знаю, что является неправильным. Это предварительный просмотр: enter image description hereSencha Touch Bundle Trial Grid

Вот код зрения:

Ext.define('demoapp.view.MainMenu',{ 
extend:'Ext.form.Panel', 
requires:['Ext.TitleBar','demoapp.store.CCAA'], 
alias:'widget.mainmenuview', 
config:{ 
    layout:{ 
     type:'fit' 
    }, 
    items:[{ 
     xtype:'fieldset', 
     items:[{ 
      xtype:'titlebar', 
      title:'Menú principal', 
      docked:'top', 
      items:[{ 
       xtype:'button', 
       text:'Desconectar', 
       itemId:'logOffButton', 
       align:'right' 
      }] 
     }, 
     { 
      xtype:'fieldset', 
      items:[{ 
       xtype:'selectfield', 
       itemId:'CCAAcombo', 
       label:'Comunidad Autonoma', 
       store:'storeCCAA', 
       displayField:'nombre', 
       valueField:'id', 
       autoSelect:false, 
       placeHolder:'Elige una para filtrar' 
      }, 
      { 
       xtype: 'container', 

       items:[{ 
        xtype: 'grid', 
        requires: ['Ext.grid.Grid', 
           'Ext.grid.HeaderGroup', 
           'Ext.grid.plugin.Editable', 
           'Ext.grid.plugin.ViewOptions', 
           'Ext.grid.plugin.MultiSelection', 
           'Ext.grid.plugin.ColumnResizing', 
           'Ext.grid.plugin.SummaryRow' 
        ], 
        title: 'EJEMPLO GRID LICITACIONES', 
        headerContainer: { 
          height: 65 
        }, 
        itemHeight: 60, 
        columns:[ 
          { 
           text:'Id' 
          }, 
          { 
           text:'N.Licitacion' 
          }, 
          { 
           text:'Organismo' 
          }, 
          { 
           text:'Tipo' 
          }, 
          { 
           text:'F-Pub' 
          }, 
          { 
           text:'Estado' 
          }, 
          { 
           text:'Ofertado' 
          }, 
          { 
           text:'Presupuestado' 
          }, 
          { 
           text:'Prorroga' 
          } 
        ] 
       }] 
      }] 
     }] 
    }], 
    listeners:[{ 
     delegate:'#logOffButton', 
     event:'tap', 
     fn:'onLogOffButtonTap' 
    }, 
    { 
     delegate:'#CCAAcombo', 
     event:'change', 
     fn:'onCCAAcomboChange' 
    }] 
}, 
onLogOffButtonTap:function(){ 
    this.fireEvent('onSignOffCommand'); 
}, 
onCCAAcomboChange:function(field,value){ 
    var idCCAA=value; 
    this.fireEvent('onCCAAcomboChangeAction',idCCAA); 
} 
}); 

Я хочу, чтобы заголовки столбцов и столбцы под заголовком.

ответ

0

Добавить:

width:'100%', 

к свойствам сетки решает эту проблему.