PDA

View Full Version : How can I add a toolbar to the grid's top bar?



vicent
28 Apr 2007, 12:06 AM
I have two question about grid ,
1 , does it can add a toobar on the grid's top bar ?
2 , how can I konw when the grid's content has been changed ? you know ,when the grid's content has been changed , it will show a small red flag to tell us , and now ,I want to let my program know that , how can I do it ?

reang
28 Apr 2007, 3:50 AM
for no. 1,



1 , does it can add a toobar on the grid's top bar ?


i have code like this :


var gridHead = EdGrid.getView().getHeaderPanel(true);
var tBar = new Ext.Toolbar(gridHead);

tBar.add(
'-',{text: 'Add',handler:add,cls : "x-btn-text-icon",icon:'images/page_add.png',tooltip: {text:'Tooltip in here', title:'Title', autoHide:true}},
'-',{text: 'Edit',handler:edit,cls : "x-btn-text-icon",icon:'images/page_edit.png',tooltip: {text:'Tooltip in here', title:'Title', autoHide:true}},
'-',{text: 'Save',handler:save,cls : "x-btn-text-icon",icon:'images/page_save.png',tooltip: {text:'Tooltip in here', title:'Title', autoHide:true}},
'-',{text: 'Delete',handler:del,cls : "x-btn-text-icon",icon:'images/page_delete.png',tooltip: {text:'Tooltip in here', title:'Title', autoHide:true}},
'-',{text: 'Refresh',handler:refresh,cls : "x-btn-text-icon",icon:'images/page_refresh.png',tooltip: {text:'Tooltip in here', title:'Title', autoHide:true}},
'-',{text: 'Download',handler:download,cls : "x-btn-text-icon",icon:'images/page_excel.png',tooltip: {text:'Tooltip in here', title:'Title', autoHide:true}},
'-'
);

vicent
28 Apr 2007, 7:04 AM
:)