PDA

View Full Version : editable:false not working for combobox in row editing plugin



afzal
23 May 2013, 6:54 AM
Hi ,

editable:false property is not working for combobox in RowEditing plugin....
I want to prevent the text typing in combobox.
Can you pls suggest me regarding this.

glopes
23 May 2013, 7:48 AM
Post your grid code.

afzal
23 May 2013, 8:56 PM
editable:false property not working in 3 rd column combobox.........

Ext.define('rtb.view.dashboard.SiteGrid',{
extend:'Ext.grid.Panel',
alias:'widget.sitegrid',
forceFit:true,
id:'siteGrid',
cls:'gridCls1',
initComponent:function() {

this.callParent(arguments);

},


columns:[
{text:'Site ID',dataIndex:'site_id',width:100},
{text:'Site Name',dataIndex:'site_name',
editor:{
xtype:'textfield',
allowBlank:false,
blankText: 'Site Name is required'

}
},
{text:'Status',dataIndex:'status_message',width:150,
editor:{
xtype:'combobox',
editable:false,
allowBlank:false,
queryMode: 'local',
//valueField: 'camp_value',
// displayField: 'camp_text',
triggerAction: 'all'


}
},
{text:'CPM(Bid Price)',dataIndex:'bid',
renderer: Ext.util.Format.usMoney,
editor:{
xtype:'numberfield',
allowBlank: false,
blankText: 'CPM is required',
minValue: 0
}
},
{text:'Overall Cap',dataIndex:'overall_cap',
renderer: Ext.util.Format.usMoney,
editor: {
xtype: 'numberfield',
minValue: 0
}
},
{text:'Daily Cap',dataIndex:'daily_cap',
renderer: Ext.util.Format.usMoney,
editor: {
xtype: 'numberfield',
minValue: 0
}
},
{text:'Imps',dataIndex:'imps'},
{text:'Clicks',dataIndex:'clicks'},
{text:'CTR %',dataIndex:'ctr'},
{text:'Cost',dataIndex:'cost'},
{text:'CPC',dataIndex:'cpc'},
{text:'Convs',dataIndex:'convs'},
{text:'eCPA',dataIndex:'ecpa'},
{text:'eCPM',dataIndex:'ecpm'}],
plugins:[{
ptype :'rowexpander',
pluginId : 'cid_expand',
id : 'expand_site',
expandOnDblClick:false,
rowBodyTpl :'<div id="banner_grid_{cid}_{ssp_website_id}"></div>'

},
{
ptype:'rowediting',
triggerEvent: 'celldblclick',
autoCancel:false

}
]
})

glopes
28 May 2013, 3:12 PM
Try setting your plugin like this:


plugins: [
Ext.create('Ext.grid.plugin.CellEditing', {
triggerEvent: 'celldblclick'
})]


And Status cell like this:


xtype : 'gridcolumn',
width : 150,
dataIndex : 'status_message',
text : 'Status',
editor : {
xtype : 'combobox',
allowBlank : false,
editable : false,
queryMode : 'local'
}