{
xtype:'panel',
tab: {cls: 'hdr3'},
title:'forst',
scope:this,
layout:'vbox',
id:'cut-area-grid-in-tab',
items: [{
xtype:'button',
centured:true,
margin: '20 0 0 0',
padding: 5,
width: '100%',
cls: 'buttonsforsave',
text:'+add',
handler: function() {
//FUNCTION FOR Ext.grid.plugin.Editable MENU CALLING
}
},{
xtype:'cut-area-grid',// THIS IS GRID
}
UPD 如何包含插件? -回答 插件包括在这样的网格类中。 加上olugin在grid类的require中定义。
plugins: [{
type: 'grideditable',
triggerEvent: 'doubletap',
enableDeleteButton: true,
formConfig: null, // See more below
defaultFormConfig: {
xtype: 'formpanel',
title:'edit',
scrollable: true,
items: {
xtype: 'fieldset'
}
},
toolbarConfig: {
xtype: 'titlebar',
// cls : 'hdr2',
// height: 46.63,
docked: 'bottom',
items: [{
xtype: 'button',
// ui: 'decline',
// cls: 'grbuttons',
text: 'no',
align: 'left',
action: 'cancel'
}, {
xtype: 'button',
// ui: 'confirm',
// cls: 'grbuttons',
text: 'save',
align: 'right',
action: 'submit',
handler: function () {
var rentgrid = this.up('#rentlist');
rentgrid.getStore().getModifiedRecords();
}
},{
xtype: 'button',
text: 'Delete',
ui: 'decline',
margin: 10,
handler: function() {
Ext.Ajax.request({
url:'/api/agreement/',
reader:{
type:'json',
rootProperty: 'results'
},
method: 'DELETE'
});
}
}]
}
},