View Full Version : [DUPE-522] readOnly for TriggerField as editor of an EditorGridPanel

2 Feb 2010, 4:39 PM
Ext version tested:

Ext 3.1.1-beta / 3.1.1-rc

css used:

only default ext-all.css

Browser versions tested against:

FF3.5.7 (firebug 1.5 installed)

Operating System:

WinXP Pro


Setting readOnly to true on an TriggerField don't hide the trigger button, when useing the TriggerField as an editor of an EditorGridPanel column, instead, it shows a square where the trigger should be.
It shows two squares if you are useing a TweenTriggerField.

Test Case:

Change the columnModel definition in the example:

// the column model has information about grid columns
// dataIndex maps the column to the specific data field in
// the data store (created below)
var cm = new Ext.grid.ColumnModel({
// specify any defaults for each column
defaults: {
sortable: true // columns are not sortable by default
columns: [
id: 'common',
header: 'Common Name',
dataIndex: 'common',
width: 220,
// use shorthand alias defined above
editor: new fm.TriggerField({
allowBlank: false,
readOnly: true
}, {
header: 'Light',
dataIndex: 'light',
width: 130,
editor: new fm.ComboBox({
typeAhead: true,
triggerAction: 'all',
// transform the data already specified in html
transform: 'light',
lazyRender: true,
listClass: 'x-combo-list-small'
}, {
header: 'Price',
dataIndex: 'price',
width: 70,
align: 'right',
renderer: 'usMoney',
editor: new fm.NumberField({
allowBlank: false,
allowNegative: false,
maxValue: 100000
}, {
header: 'Available',
dataIndex: 'availDate',
width: 95,
renderer: formatDate,
editor: new fm.DateField({
format: 'm/d/y',
minValue: '01/01/06',
disabledDays: [0, 6],
disabledDaysText: 'Plants are not available on the weekends'
checkColumn // the plugin instance

7 Feb 2010, 8:31 PM
Fairly minor, it's actually just the cell background that is being shown.

Jamie Avins
5 Mar 2010, 10:34 AM
Closing this as a Dupe: