2013-06-28 72 views

回答

2

您可以使用ExtJS的tbar来实现组件网格标题:

tbar: [ 
    { xtype: 'button', text: 'Button 1' } 
] 

或:

dockedItems: [{ 
    xtype: 'toolbar', 
    dock: 'top', 
    items: [ 
     { xtype: 'button', text: 'Button 1' } 
    ] 
}] 

实施combobox,最好的方法是定义自定义组合框组件并为其提供alias,那么在您的网格tbar中只需说xtype: 'mygridcombo'

这里是一个example

1

这对我的作品以及

{ 
    text  : 'Save Energy Mode', 
    dataIndex: 'fs', 
    items: [{ 
     xtype: 'combobox', 
     padding: 2, 
     flex: 1 
    }] 
    } 

或简单地(如果您不需要标题文本)

 columns: { items: [{ xtype: 'combobox'}] } 
相关问题