RadTextBox disables on mouseover

918 views Asked by At

I'm having trouble with a RadTextBox. Telerik seems to have baked in this really cool feature (insert sarcasm) that if you at one point set the enabled property of the control to false then set it to true say on an event, on hover, the control will go back to the enabled=false state.

So I have a RadTextBox. On pageload I set it enabled to false. Then on an event (clicking an Edit button), I set enabled to true. But when I mouseover, the RadTextBox goes back to being disabled.

I've found some help using RadTextBox.HoveredStyle but that only helps with styling, not the enabled property.

    <telerik:RadTextBox runat="server" ID="RadNoteTextbox" TextMode="MultiLine" CssClass="casenotes-preview-textbox" Skin="" Text="Preview Note" MaxLength="7000"></telerik:RadTextBox>

    private void EnableTextBox()
    {
        RadNoteTextbox.BorderWidth = 2;
        RadNoteTextbox.BackColor = Color.White;
        //RadNoteTextbox.ReadOnly = false;
        RadNoteTextbox.Enabled = true;
    }

    private void DisableTextBox()
    {
        RadNoteTextbox.BorderWidth = 0;
        RadNoteTextbox.BackColor = Color.WhiteSmoke;
        //RadNoteTextbox.ReadOnly = true;
        RadNoteTextbox.Enabled = false;
    }
1

There are 1 answers

0
mcnnowak On BEST ANSWER

Looks like you're going to have to customize HoverStyle, EnabledStyle, and FocusedStyle. They've changed this in the newest version to support more customizable styles.

See this link for reference.