i am working in extjs. I have libraryview with grid cellediting plugin as-
Ext.define('H.view.library.LibraryListView', {
extend: 'Ext.grid.Panel',
alias : 'widget.librarylistview',
id:'librarylistviewId',
store: 'LibraryFileStore',
requires:['RUI.view.campaign.ImageViewer'],
plugins:[
Ext.create('Ext.grid.plugin.CellEditing',{
clicksToEdit: 1,
listeners: {
'edit': function(editor,e) {
var me=this;
title = e.value;
id = e.record.get('id');
}
}
})
],
I want to disable this editing when status=0. So what changes i need to do for disabling and enabling cellediting depending upon condition
You can disable the editing by adding beforeEdit event on the grid -
You can get more information about the beforeedit event and the different values that you can get from the parameters of this function over here -
http://docs.sencha.com/extjs/4.1.0/#!/api/Ext.grid.Panel-event-beforeedit