Hi everybody, I'm posting something very similar to my last thread because I haven't find a solution for my problem.
My issues is: I got a cellediting plugin in my grid and is set to true, so it's active, now i want a button that is capable of switching this setting from 'true' to 'false' and viceversa.
I understand that I have to reinitialize the plugin but I really haven't understand how, really appreciate some suggestion with an example code.
thank you all

My code (I know it would be probably is a bit messy but i'm still learning to program in js):

Ext.application({
name: 'MyApp',
launch: function () {
Ext.create('Ext.grid.Panel', {
title: 'Classic Grid',
autoScroll: true,
height: window.innerHeight, // legge in automatico le dimensioni della finestra a disposizione
width: window.innerWidth,
renderTo: document.body,
layout:'fit',

requires: [
'Ext.grid.filters.Filters',
'Ext.plugin.Viewport',
'Ext.window.MessageBox',
'App.view.main.MainController',
'App.view.main.MainModel',
'App.view.main.List'
],

store: store,

plugins: {
cellediting: true,
gridfilters: true
},

emptyText: 'No Matching Records',
loadMask: true,
stateful: true,

// top bar della griglia con 3 pulsanti, mostra filtri, elimina filtri, abilitazione cellediting
tbar: [{
text: 'Show Filters...',
tooltip: 'Show filter data for the store',
handler: function () {
var data = [];
this.store.getFilters().each(function (filter) {
data.push(filter.serialize());
}),
data = Ext.JSON.encodeValue(data, '\n').replace(/^[]+/gm, function (s) {
for (var r = '', i = s.length; i--; ) {
r += ' ';
}
return r;
}),
data = data.replace(/\n/g, '<br>'),

Ext.Msg.alert('Filter Data', data)
}
}, {
text: 'Clear Filters',
tooltip: 'Clear all filters',
handler: function(btn) {
var grid = btn.up('gridpanel');
grid.getPlugin('gridfilters').clearFilters();
}
}, {
text: 'Enable Editing',
tooltip: 'Click to enable cell editing',
handler: function (cellediting){


}
}],

// regola di visualizzazione delle righe
viewConfig: {
enableTextSelection: true,
stripeRows: false,
getRowClass: function(record) {
return record.get('height') < 1.1 ? 'child-row' : 'adult-row';
}
},

columnlines: true,
controller: 'grid',
// collapsible: true,
multiSelect: true,
controller: 'multi-sort-grid',
multiColumnSort: true,
// resizable: true,
// features: [{ ftype: 'grouping' }],

columns: [
{text: 'Name', width: 100, dataIndex: 'name', locked: true, editor: {xtype:'textfield', allowBlank: false}, filter: {type: 'string', itemDefaults: {emptyText: 'Search for...'}}},
{text: 'Email Address', width: 200, dataIndex: 'email', editor: {xtype:'textfield', allowBlank: false}},
{text: 'Phone Number', width: 200, dataIndex: 'phone', editor: {xtype:'textfield', allowBlank: false}, filter: 'list'},
{text: 'Height [m]', width: 200, dataIndex: 'height', editor: {xtype:'textfield', allowBlank: false}, filter: 'number'},
{text: 'Weight [kg]', width: 200, dataIndex: 'weight', editor: {xtype:'textfield', allowBlank: false}, filter: 'number'},
{text: 'Occupation', width: 200, dataIndex: 'work', editor: {xtype:'textfield', allowBlank: false}, filter: 'list'},
{text: 'Hobby', width: 200, dataIndex: 'hobby', editor: {xtype:'textfield', allowBlank: false}},
{text: 'Color', width: 200, dataIndex: 'color', editor: {xtype:'textfield', allowBlank: false}},
{text: 'Best Friend ', width: 200, dataIndex: 'bestfriend', editor: {xtype:'textfield', allowBlank: false}},
{text: 'Birthday', width: 200, dataIndex: 'birthday', editor: {xtype:'textfield', allowBlank: false}, filter: {type: 'date', pickerDefaults: {}}},
{text: 'Graduated', width: 200, dataIndex: 'graduated', editor: {xtype:'textfield', allowBlank: false}, filter: 'boolean'}
],
renderTo: Ext.getBody(),

// listener per il menù personalizzato
listeners: {
scope: this,
itemcontextmenu: function (a, b, c, d, e) {
e.stopEvent();
mymenu.showAt(e.getXY());
}
}
});
}});

var store = Ext.create('Ext.data.Store', {
fields: ['name', 'email', 'phone', 'height [m]', 'weight [kg]', 'occupation', 'bestfriend', 'hobby', 'color', 'birthday', 'Degree'],
data: [
{"name":'Lisa', "email":"[email protected]", "phone":"555-111-1224", "height":"1", "weight":"30", "work":"student", "hobby":"Jazz", "color":"blue", "bestfriend":"none", "birthday":"19/07/1992", "graduated":false},
{"name":'Bart', "email":"[email protected]", "phone":"555-222-1234", "height":"1", "weight":"40", "work":"student", "hobby":"Prank", "color":"red", "bestfriend":"Milouse", "birthday":"19/07/1992", "graduated":false},
{"name":'Homer', "email":"[email protected]", "phone":"555-222-1244", "height":"1,8", "weight":"100", "work":"nuclear plant", "hobby":"Beer", "color":"yellow", "bestfriend":"Barney", "birthday":"19/07/1992", "graduated":true},
{"name":'Marge', "email":"[email protected]", "phone":"555-222-1254", "height":"1,7", "weight":"60", "work":"housewife", "hobby":"Paint", "color":"orange", "bestfriend":"none", "birthday":"19/07/1992", "graduated":true},
{"name":'Lisa', "email":"[email protected]", "phone":"555-111-1224", "height":"1", "weight":"30", "work":"student", "hobby":"Jazz", "color":"blue", "bestfriend":"none", "birthday":"19/07/1992", "graduated":false},
{"name":'Bart', "email":"[email protected]", "phone":"555-222-1234", "height":"1", "weight":"40", "work":"student", "hobby":"Prank", "color":"red", "bestfriend":"Milouse", "birthday":"19/07/1992", "graduated":false},
{"name":'Homer', "email":"[email protected]", "phone":"555-222-1244", "height":"1,8", "weight":"100", "work":"nuclear plant", "hobby":"Beer", "color":"yellow", "bestfriend":"Barney", "birthday":"19/07/1992", "graduated":true},
{"name":'Marge', "email":"[email protected]", "phone":"555-222-1254", "height":"1,7", "weight":"60", "work":"housewife", "hobby":"Paint", "color":"orange", "bestfriend":"none", "birthday":"19/07/1992", "graduated":true},
{"name":'Lisa', "email":"[email protected]", "phone":"555-111-1224", "height":"1", "weight":"30", "work":"student", "hobby":"Jazz", "color":"blue", "bestfriend":"none", "birthday":"19/07/1992", "graduated":false},
{"name":'Bart', "email":"[email protected]", "phone":"555-222-1234", "height":"1", "weight":"40", "work":"student", "hobby":"Prank", "color":"red", "bestfriend":"Milouse", "birthday":"19/07/1992", "graduated":false},
{"name":'Homer', "email":"[email protected]", "phone":"555-222-1244", "height":"1,8", "weight":"100", "work":"nuclear plant", "hobby":"Beer", "color":"yellow", "bestfriend":"Barney", "birthday":"19/07/1992", "graduated":true},
{"name":'Marge', "email":"[email protected]", "phone":"555-222-1254", "height":"1,7", "weight":"60", "work":"housewife", "hobby":"Paint", "color":"orange", "bestfriend":"none", "birthday":"19/07/1992", "graduated":true},
{"name":'Lisa', "email":"[email protected]", "phone":"555-111-1224", "height":"1", "weight":"30", "work":"student", "hobby":"Jazz", "color":"blue", "bestfriend":"none", "birthday":"19/07/1992", "graduated":false},
{"name":'Bart', "email":"[email protected]", "phone":"555-222-1234", "height":"1", "weight":"40", "work":"student", "hobby":"Prank", "color":"red", "bestfriend":"Milouse", "birthday":"19/07/1992", "graduated":false},
{"name":'Homer', "email":"[email protected]", "phone":"555-222-1244", "height":"1,8", "weight":"100", "work":"nuclear plant", "hobby":"Beer", "color":"yellow", "bestfriend":"Barney", "birthday":"19/07/1992", "graduated":true},
{"name":'Marge', "email":"marge[email protected]", "phone":"555-222-1254", "height":"1,7", "weight":"60", "work":"housewife", "hobby":"Paint", "color":"orange", "bestfriend":"none", "birthday":"19/07/1992", "graduated":true},
{"name":'Lisa', "email":"[email protected]", "phone":"555-111-1224", "height":"1", "weight":"30", "work":"student", "hobby":"Jazz", "color":"blue", "bestfriend":"none", "birthday":"19/07/1992", "graduated":false},
{"name":'Bart', "email":"[email protected]", "phone":"555-222-1234", "height":"1", "weight":"40", "work":"student", "hobby":"Prank", "color":"red", "bestfriend":"Milouse", "birthday":"19/07/1992", "graduated":false},
{"name":'Homer', "email":"[email protected]", "phone":"555-222-1244", "height":"1,8", "weight":"100", "work":"nuclear plant", "hobby":"Beer", "color":"yellow", "bestfriend":"Barney", "birthday":"19/07/1992", "graduated":true},
{"name":'Marge', "email":"[email protected]", "phone":"555-222-1254", "height":"1,7", "weight":"60", "work":"housewife", "hobby":"Paint", "color":"orange", "bestfriend":"none", "birthday":"19/07/1992", "graduated":true},
{"name":'Lisa', "email":"[email protected]", "phone":"555-111-1224", "height":"1", "weight":"30", "work":"student", "hobby":"Jazz", "color":"blue", "bestfriend":"none", "birthday":"19/07/1992", "graduated":false},
{"name":'Bart', "email":"[email protected]", "phone":"555-222-1234", "height":"1", "weight":"40", "work":"student", "hobby":"Prank", "color":"red", "bestfriend":"Milouse", "birthday":"19/07/1992", "graduated":false},
{"name":'Homer', "email":"[email protected]", "phone":"555-222-1244", "height":"1,8", "weight":"100", "work":"nuclear plant", "hobby":"Beer", "color":"yellow", "bestfriend":"Barney", "birthday":"19/07/1992", "graduated":true},
{"name":'Marge', "email":"[email protected]", "phone":"555-222-1254", "height":"1,7", "weight":"60", "work":"housewife", "hobby":"Paint", "color":"orange", "bestfriend":"none", "birthday":"19/07/1992", "graduated":true},
{"name":'Lisa', "email":"[email protected]", "phone":"555-111-1224", "height":"1", "weight":"30", "work":"student", "hobby":"Jazz", "color":"blue", "bestfriend":"none", "birthday":"19/07/1992", "graduated":false},
{"name":'Bart', "email":"[email protected]", "phone":"555-222-1234", "height":"1", "weight":"40", "work":"student", "hobby":"Prank", "color":"red", "bestfriend":"Milouse", "birthday":"19/07/1992", "graduated":false},
{"name":'Homer', "email":"[email protected]", "phone":"555-222-1244", "height":"1,8", "weight":"100", "work":"nuclear plant", "hobby":"Beer", "color":"yellow", "bestfriend":"Barney", "birthday":"19/07/1992", "graduated":true},
{"name":'Marge', "email":"[email protected]", "phone":"555-222-1254", "height":"1,7", "weight":"60", "work":"housewife", "hobby":"Paint", "color":"orange", "bestfriend":"none", "birthday":"19/07/1992", "graduated":true},
{"name":'Lisa', "email":"[email protected]", "phone":"555-111-1224", "height":"1", "weight":"30", "work":"student", "hobby":"Jazz", "color":"blue", "bestfriend":"none", "birthday":"19/07/1992", "graduated":false},
{"name":'Bart', "email":"[email protected]", "phone":"555-222-1234", "height":"1", "weight":"40", "work":"student", "hobby":"Prank", "color":"red", "bestfriend":"Milouse", "birthday":"19/07/1992", "graduated":false},
{"name":'Homer', "email":"[email protected]", "phone":"555-222-1244", "height":"1,8", "weight":"100", "work":"nuclear plant", "hobby":"Beer", "color":"yellow", "bestfriend":"Barney", "birthday":"19/07/1992", "graduated":true},
{"name":'Marge', "email":"[email protected]", "phone":"555-222-1254", "height":"1,7", "weight":"60", "work":"housewife", "hobby":"Paint", "color":"orange", "bestfriend":"none", "birthday":"19/07/1992", "graduated":true},
{"name":'Lisa', "email":"[email protected]", "phone":"555-111-1224", "height":"1", "weight":"30", "work":"student", "hobby":"Jazz", "color":"blue", "bestfriend":"none", "birthday":"19/07/1992", "graduated":false},
{"name":'Bart', "email":"[email protected]", "phone":"555-222-1234", "height":"1", "weight":"40", "work":"student", "hobby":"Prank", "color":"red", "bestfriend":"Milouse", "birthday":"19/07/1992", "graduated":false},
{"name":'Homer', "email":"[email protected]", "phone":"555-222-1244", "height":"1,8", "weight":"100", "work":"nuclear plant", "hobby":"Beer", "color":"yellow", "bestfriend":"Barney", "birthday":"19/07/1992", "graduated":true},
{"name":'Marge', "email":"[email protected]", "phone":"555-222-1254", "height":"1,7", "weight":"60", "work":"housewife", "hobby":"Paint", "color":"orange", "bestfriend":"none", "birthday":"19/07/1992", "graduated":true}
]
});

// creazione menù personalizzato
var mymenu = new Ext.menu.Menu({
items: [
{
text: 'Esportazione Dati',
handler: function () {
alert("Item 1 clicked");
}
}, {
text: 'Mostra Andamento',
handler:function(){
panel.show();
}
}
]
});

// elimina il menù del browser
Ext.getDoc().on('contextmenu', function(ev) {
ev.preventDefault();
});

// pannello per visualizzazione degli andamenti
var panel=Ext.create(Ext.window.Window,{
title:'Andamento Temporale',
height: 500,
width: 700,
modal: true, //previene altre azioni
layout: 'fit',
//autoDestroy: true,
closeAction:'hide', //non elimina i contenuti!!!! (close)
items: {
//xtype: 'cartesian'
},
// download del grafico in formato jpg
bbar: [{
text: 'Save Chart',
handler: function() {
Ext.MessageBox.confirm('Confirm Download', 'Would you like to download the chart as an image?', function(choice){
if(choice == 'yes'){
chart.save({
type: 'image/png'
});
}
});
}}]
});