PHP Code:
var cm = new Ext.grid.ColumnModel([{
header: 'Vorname',
dataIndex: 'vorname',
width: 150,
sortable: true,
editor: new Ext.grid.GridEditor(new Ext.form.TextField({
allowBlank: true,
inputType: 'text'
}))
}, {
header: 'Nachname',
dataIndex: 'nachname',
width: 150,
sortable: true,
editor: new Ext.grid.GridEditor(new Ext.form.TextField({
allowBlank: true,
inputType: 'text'
}))
}, {
header: 'Firmenname',
dataIndex: 'firmenname',
width: 200,
sortable: true,
editor: new Ext.grid.GridEditor(new Ext.form.TextField({
allowBlank: true,
inputType: 'text'
}))
}, {
dataIndex: 'options',
width: 65,
sortable: false,
resizable: false,
editable: false
}]);
var grid = new Ext.grid.EditorGrid('topic-grid', {
ds: AddressDatastore,
cm: cm,
loadMask: true,
selModel: new Ext.grid.RowSelectionModel({singleSelect: false}),
enableColLock: false,
enableDragDrop: true
});
// Header-Toolbar
var tb = new Ext.Toolbar(grid.getView().getHeaderPanel(true));
tb.add({
icon: 'images/add.gif',
text: 'Adresse hinzufügen',
cls: 'x-btn-text-icon',
handler: function() {
addAddress();
}
}, {
icon: 'images/csv_import.gif',
text: 'CSV importieren',
cls: 'x-btn-text-icon',
handler: function() {
csvAddressImport();
}
}, {
icon: 'images/csv_export.gif',
text: 'CSV exportieren',
cls: 'x-btn-text-icon',
handler: function() {
csvAddressExport();
}
});
I have the following problem:
When i change the Grid my Toolbar can't be displayed again.