ashimmohanty
26 Apr 2012, 2:25 AM
Hi,
I want to disable/enable cells according to the value in the which is selected in the combobox in the same row.
I am using a listener to get the value of the combobox..but not able to figure out how to use that value to disable/enable the other cells in the same row.
Please give an idea.
Thanks
This is my grid panel
this.columns = [
this.abcDropdownColumn({
header : 'Abc',
sortable : true,
dataIndex : 'abcDesc',
displayField : 'description',
grid : me
}),
{header: " Comments", dataIndex: 'Comments'},
{header: "Days", dataIndex: 'Days'}
abcDropdownColumn : function(config) {
return {
header : config.header,
//width : config.width,
dataIndex : config.dataIndex,
editor : {
xtype : 'combo',
id: 'rightsCombo',
editable : true,
allowBlank : false,
queryMode : 'remote',
typeAhead : true,
//hideTrigger : true,
store : 'Store',
displayField : 'abcDesc',
valueField : 'abcDesc',
triggerAction : 'all',
forceSelection : true,
listConfig : {
loadingText : 'Searching...',
emptyText : 'No matching abc...'
},
grid: config.grid,
displayFieldUpdateTarget: config.displayField,
listeners: {
select: function(combo, records, opts) {
if (records.length > 0) {
var record = this.grid.getStore().getAt(this.grid.getSelectionModel().position.row);
if(records[0].data.commonProperty == " Exhibition"){
//need to put the condition here so as to make the "comment" cell and "days" cell editable
}
}
}
}
}
}
I want to disable/enable cells according to the value in the which is selected in the combobox in the same row.
I am using a listener to get the value of the combobox..but not able to figure out how to use that value to disable/enable the other cells in the same row.
Please give an idea.
Thanks
This is my grid panel
this.columns = [
this.abcDropdownColumn({
header : 'Abc',
sortable : true,
dataIndex : 'abcDesc',
displayField : 'description',
grid : me
}),
{header: " Comments", dataIndex: 'Comments'},
{header: "Days", dataIndex: 'Days'}
abcDropdownColumn : function(config) {
return {
header : config.header,
//width : config.width,
dataIndex : config.dataIndex,
editor : {
xtype : 'combo',
id: 'rightsCombo',
editable : true,
allowBlank : false,
queryMode : 'remote',
typeAhead : true,
//hideTrigger : true,
store : 'Store',
displayField : 'abcDesc',
valueField : 'abcDesc',
triggerAction : 'all',
forceSelection : true,
listConfig : {
loadingText : 'Searching...',
emptyText : 'No matching abc...'
},
grid: config.grid,
displayFieldUpdateTarget: config.displayField,
listeners: {
select: function(combo, records, opts) {
if (records.length > 0) {
var record = this.grid.getStore().getAt(this.grid.getSelectionModel().position.row);
if(records[0].data.commonProperty == " Exhibition"){
//need to put the condition here so as to make the "comment" cell and "days" cell editable
}
}
}
}
}
}