PDA

View Full Version : Change fieldCls Dynamically



sujitghanti
11 Nov 2013, 9:41 PM
Is there any way to change textbox's fieldCls dynamically.
Like e.fieldCls = "newClass" ??

Thanks in advance

Piruthu
11 Nov 2013, 10:01 PM
Use addCls (http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.form.field.Text-method-addCls) and add css style like


.newClass .x-form-field{
background: red;
}

sujitghanti
11 Nov 2013, 10:42 PM
This thing worked. Thank you..