读书人

Ext.grid.GridPanel 添2个tbar

发布时间: 2012-11-05 09:35:12 作者: rapoo

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(); }
??????????????? }]

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

????????? }

?????? }

});

?

?

?

读书人网 >Web前端

热点推荐