搜索條件很多,一行toolbar不夠用了,默認情況下ext一行toolbar過長時後面的內容就自動隱藏了。這裏找到一個辦法,很簡單,再增加一個toolbar。
// create the editor grid
var grid = new Ext.grid.EditorGridPanel({
store: store,
cm: cm,
renderTo: 'editor-grid',
width:600,
height:300,
autoExpandColumn:'common',
title:'Edit Plants?',
frame:true,
plugins:checkColumn,
clicksToEdit:1,
tbar: new Ext.Toolbar({
autoWidth:true,
autoShow:true,
items:[
{text: 'there is a add button for test'},
'-',
'->',
{text: 'there is a update button for test'},
{text: 'there is a delete button for test'}
]
})
});
//重點
this.bbar2 = new Ext.Toolbar({
renderTo:grid.tbar //
,items:['Example of second toolbar', '-', {
text:'Button'
,iconCls:'icon-key'
}, '-'
]
});
//bbar2就是新增加的toolbar
// trigger the data store load
store.load();
});
// create the editor grid
var grid = new Ext.grid.EditorGridPanel({
store: store,
cm: cm,
renderTo: 'editor-grid',
width:600,
height:300,
autoExpandColumn:'common',
title:'Edit Plants?',
frame:true,
plugins:checkColumn,
clicksToEdit:1,
tbar: new Ext.Toolbar({
autoWidth:true,
autoShow:true,
items:[
{text: 'there is a add button for test'},
'-',
'->',
{text: 'there is a update button for test'},
{text: 'there is a delete button for test'}
]
})
});
//重點
this.bbar2 = new Ext.Toolbar({
renderTo:grid.tbar //
,items:['Example of second toolbar', '-', {
text:'Button'
,iconCls:'icon-key'
}, '-'
]
});
//bbar2就是新增加的toolbar
// trigger the data store load
store.load();
});