当前位置: 代码迷 >> Web前端 >> Ext.grid.GridPanel 添2个tbar
  详细解决方案

Ext.grid.GridPanel 添2个tbar

热度:598   发布时间:2012-11-05 09:35:12.0
Ext.grid.GridPanel 加2个tbar

var grid = new Ext.grid.GridPanel({
???region:'center',
???store: ds, cm: cm, sm: sm,

?? tbar: [{
???????? ?text: '1', iconCls: 'icon_art_edit', handler: function(btn){ }
???????? },'-',{
???????? ?text: '2, iconCls: 'icon_art_add', handler: function(btn){ }
???????? },{
???????? ?text: '3, iconCls: 'icon_art_delete', handler: function(btn){ }
???????? },'-',{
???????? ?text: '4, iconCls: 'icon_p_a', handler: function(btn){? }
???????? },{
???????? ?text: '5, iconCls: 'icon_p_r_0', handler: function(btn){ }
???????? }],

?????????listeners : {
???????? ??'render': function() {
?????????????? this.tbar2 = new Ext.Toolbar({?
?????????????? renderTo: grid.tbar,
?????????????? items:['->',
??????????????????????? '代理商:',new Ext.form.TextField({ id:'qfield1',width:120 }),{
??????????????????????? text: '查询', iconCls: 'icon_find', handler: function(){ ds.reload(); }
??????????????? }]

??????????? })

????????? }

?????? }

});

?

?

?

  相关解决方案