PDA

View Full Version : [CLOSED] Combobox ReadOnly property works differently from CodeBehind and JavaScript



Maitreya
Oct 31, 2014, 12:31 PM
If I set the readonly property from Code Behind: The arrow appears disabled and the text are is also not editable.


But if I set readOnly from java script: The text area is editable and the arrow appears to be enabled though it's not.


How can I make it work the same way it works from Code Behind

Daniil
Oct 31, 2014, 4:43 PM
Hi @Maitreya,

In JavaScript you should use the setReadOnly method.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.form.field.Base-method-setReadOnly

field.setReadOnly(true);