View Full Version : Ext.grid.EditorGridPanel protect specific row from edition

19 Nov 2010, 3:26 AM

I have a request from my user to be avoid the editing of specific row, is it possible/anybody already done that? I can catch the "click" event but how disable the editor?
Actually, the only way I found is to throw an JS Alert on mousedown, but I have to apply this on each column (even if I have only two in that case)

Thank you
Hereunder, a part of my code

new Ext.grid.EditorGridPanel({
id: 'gp_IncomesList',
ds: new Ext.data.XmlStore({
cm: new Ext.grid.ColumnModel([
, {
dataIndex: 'ADJUSTED',
header: 'Adjustement',
align: 'right',
renderer: function(value,metaData,record,rowIndex,colIndex,store) {
return Ext.util.Format.number(value,'000.000.000,00/i');
editor: new Ext.form.NumberField({
allowBlank: true,
allowNegative: true,
maxValue: 1000000
mousedown: function(col,grid,rowindex,e) {
if (rowindex==1) {
alert('You can not edit this row');