This is a migrated thread and some comments may be shown as answers.

Messed up RadNumericTextbox Display?

2 Answers 69 Views
Input
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 13 Apr 2012, 01:11 AM
I am trying to set the text color of a Read-Only NumericTexbox - in the code below.

With my first CSS Class, the font color is not assigned.  When I add "!important" in the second one, I end up seeing strange additional text that should not be visible.  

Am I doing this wrong or is this a bug?  

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Numeric_Bug.aspx.vb" Inherits="Elan.Web.Numeric_Bug" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head id="Head1" runat="server">
    <title></title>
    <style type="text/css">
        .disabledNumericTextbox
        {
            color: Red;
        }
        .disabledNumericTextboxBroken
        {
            color: Red !important;
        }
    </style>
</head>
<body>
    <form runat="server" id="form1">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />
    <div style="padding: 50px; border: 1px solid #ccc">
        <telerik:RadNumericTextBox runat="server" ID="RadNumericTextBox3" ReadOnly="true"
            ReadOnlyStyle-CssClass="disabledNumericTextbox" NumberFormat-DecimalDigits="2"
            Value="80000.85" Width="110" ReadOnlyStyle-HorizontalAlign="Right" />
        <telerik:RadNumericTextBox runat="server" ID="RadNumericTextBox4" ReadOnly="true"
            Value="80000.85" ReadOnlyStyle-CssClass="disabledNumericTextboxBroken" NumberFormat-DecimalDigits="2"
            Width="110" ReadOnlyStyle-HorizontalAlign="Right" />
 
    </div>
    <telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false"
        ReloadOnShow="true" runat="server" EnableShadow="true" />
    </form>
</body>
</html>

2 Answers, 1 is accepted

Sort by
0
Dan
Top achievements
Rank 1
answered on 13 Apr 2012, 05:42 AM
0
Accepted
Tsvetina
Telerik team
answered on 18 Apr 2012, 08:24 AM
Hi Dan,

Modify your CSS selector for the readonly color as follows and the problem should go away (remove the !important):
.riSingle.RadInput .disabledNumericTextboxBroken
{
    color: Red;
}


Kind regards,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Input
Asked by
Dan
Top achievements
Rank 1
Answers by
Dan
Top achievements
Rank 1
Tsvetina
Telerik team
Share this question
or