Hi

I have created a control by extending the ext:TextField control like below?

public class MyTextField : Ext.Net.TextField
I am setting the ext.net ?ReadOnly? property in javascript like below?
txtCompanyName.setReadOnly(true);
I want to change the visual appearance of the control based on the ReadOnly property value (I don?t want the default behavior of the ext:TextField and compulsorily want to create my custom control). I am trying to do that in the PreRender function like below?
protected override void OnPreRender(EventArgs e)
        {
            if (ReadOnly == true)
            {
                base.StyleSpec = "border-top: 0px; border-left: 0px; border-right:0px; background: transparent;";
                base.AllowBlank = true;
                base.EmptyText = "";
            }

            base.MsgTarget = MessageTarget.Side;
            base.OnPreRender(e);       
        }
I see that the ReadOnly property is always false in PreRender and hence the code doesn?t get into the conditional block. Why doesn?t the change to the property in javascript get reflected during PreRender. What am I missing? Is there an alternate way of achieving the requirement of changing control appearance of the derived control?