I use an Ext.ux.grid.RowEditor plugin in a gridpanel. I put two columns in the grid panel a combobox and a textfield. I need to set enable / disable the textfield when I select an item from combo box. this is my code. thank you regards.
Code:
//roweditor definition
var editor = new Ext.ux.grid.RowEditor({
saveText: 'Grabar'
});
//gridpanel definition
var grid = new Ext.grid.GridPanel({
renderTo: document.body,
enablecolumnmove:true,
title: 'Informacion',
store: dsgrid,
frame:true,
height:200,
width:1000,
region:'center',
plugins: [editor],
tbar: [{
text: 'Agregar Registro',
handler: function(){
var e = new dr_grid({
type:'',
concepto:''});
editor.stopEditing();
dsgrid.insert(0, e);
grid.getView().refresh();
grid.getSelectionModel().selectRow(0);
editor.startEditing(0);
}
},{ text: 'Remover registro',
disabled: true,
handler: function(){
editor.stopEditing();
var s = grid.getSelectionModel().getSelections();
for(var i = 0, r; r = s[i]; i++){
dsgrid.remove(r);
}
}
}],
columns: [{header: "Type", dataIndex: 'type',editor: cmbtype, renderer:cmbtype(cmbtype)},
{header: "concepto", dataIndex: 'concepto', editor: concepto}]
});
//this is de event select
cmbtype.on ('select',function(){
if (Ext.util.Format.uppercase(tipo)=='JURIDICA')
{
concepto.disabled=true; //this is the problem, without error but doesn't work.
}
else
{
concepto.disabled=false;
}
});