I want to disable a combobox.
Ext.getCmp(elmID).disable();
When I do this the combobox disappears in IE 7. Please help
I want to disable a combobox.
Ext.getCmp(elmID).disable();
When I do this the combobox disappears in IE 7. Please help
I've got the same problem. Calling setDisabled(true) on an Ext.form.ComboBox, makes it disappear on IE8. Commenting out the call, and the component does not disappear. Works fine for Firefox.
[I even put the call to setDisabled(true) in a few second DelayTask() by itself to verify it was the culprit. It disappeared when the task fired.]
Anyone have a fix?
Hi,
Ext.getCmp(elmID).disabled = true;
Ext.getCmp(elmID).setEditable(false);
This worked
Setting it to non-editable does not make it appear disabled. Here is a workaround that does.
Clone the x-item-disabled CSS:
Then useCode:.x-item-disabled-ie { color:gray;cursor:default;opacity:.6;-moz-opacity:.6; -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; }in the ComboBox's config.Code:disabledClass: Ext.isIE ? 'x-item-disabled-ie' : 'x-item-disabled'
I tried both of the solutions suggested, but neither seemed to have any effect at all. Has anyone found a better fix?
Thanks,Code:{ fieldLabel: 'Status', hiddenName: 'status_id', xtype: 'combo', store: status_store, valueField: 'id', displayField: 'name', typeAhead: true, mode: 'local', triggerAction: 'all', allowBlank: true, selectOnFocus: true, forceSelection: true, value: 0 ,disabled: true },{ xtype: 'panel', border: false, html: '<br />' },{ fieldLabel: 'Status #1 Date', name: 'status_1_date', xtype: 'datefield', width: 100 ,disabled: true },{ fieldLabel: 'Status #1', name: 'status_1', allowBlank: true, xtype: 'textarea', height: 60 ,disabled: true },{ xtype: 'panel', border: false, html: '<br />' },{ fieldLabel: 'Status #2 Date', name: 'status_2_date', xtype: 'datefield', width: 100 ,disabled: true },{ fieldLabel: 'Status #2', name: 'status_2', allowBlank: true, xtype: 'textarea', height: 60 ,disabled: true },{ xtype: 'panel', border: false, html: '<br />' },{ fieldLabel: 'Status #3 Date', name: 'status_3_date', xtype: 'datefield', width: 100 ,disabled: true },{ fieldLabel: 'Status #3', name: 'status_3', allowBlank: true, xtype: 'textarea', height: 60 ,disabled: true }
Gary
Prez: Summit Media Concepts - Partner: Intelmarx
additional notice
this happens on IE7/8 with
(none of fixes above works)HTML Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
while with i.e. following doctype declaration everything's working fine (no fix necessary):
HTML Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN" "http://www.w3.org/TR/html4/strict.dtd">
any solution?
this.setDisabled(true);
this.setEditable(false);
worked for me (IE7)
Hi.
I have the same trouble, and i am wondering is there some "official" fix? or just workaround?
Thanks.
Cheers.
Hey Ext developers, anyone?
Found out that having a different hiddenName and id solves my problem.
In your example the id was not set. Try to make sure both are unique among all elements.
i.e. try
...
hiddenName:'status_name',
id:'status_id'
Last edited by sencha10; 14 Jan 2011 at 11:57 AM. Reason: Added my working work-around
.x-item-disabled {
filter:'' !important;
}
This worked for me![]()