PDA

View Full Version : Trying to disable specific rows in EditorGridPanel



khbuex
11 Apr 2010, 6:29 AM
Hi,

I'm trying to disable all rows which a specific value of on of the cells of them is set to True.
I've wrote this thing inside the EditorGridPanel:


selModel: new Ext.grid.RowSelectionModel({singleSelect: false, moveEditorOnEnter: false, listeners: {
beforerowselect: function(selModel, rowIndex, keepExisting, record){
if(record.get('Locked') == true) {
return false;
}
}
}}),
The row isn't selected (it stays white), but the cell is still going into his "edit mode".
How do I manage to lock the row for edit?

Thanks!

khbuex
12 Apr 2010, 8:20 AM
please.?

Stormseeker
12 Apr 2010, 8:34 AM
var myGridComponent = Ext.getCmp('myGridId');
var editor = myGridcomponent.getColumnModel().getCellEditor(columnIndex, rowIndex);
editor.on('beforeshow', function(component) {
}