0

I am working with Extjs 3.2 ,my Editor grid consist of 5 column, 4 editable fields and 1 checkbox,

The requirement is that when i uncheck the checkbox, the other four Cells of that row must become readonly.

I am getting the Checked rowIndex ,columnIndex by using Cellclick event, but how do I select that Cell and set the property to Readonly/UnEditable. I have tried using

    gridItems.setEditable(rowIndex, editable);

    gridItems[rowIndex].set('editable', true);

But it is not working.

I am really not getting the reason why this isn't working, do you have any ideas on what I could do differently?

bakoyaro
  • 2,550
  • 3
  • 36
  • 63
Yash Max
  • 9
  • 1
  • 4

2 Answers2

0

Try this to set the readonly attribute for your checkbox

Ext.getCmp('id').setReadOnly(true);
bakoyaro
  • 2,550
  • 3
  • 36
  • 63
0

You could use the 'beforeEdit' event and return false if the record value of the checkbox column is false, e.g.

'beforeEdit' : function(e){
    var record = e.record;                          
   if(record.get("checkboxColumnKey") == false){
    return false;       
   }
}
Davis Lay
  • 11
  • 2