Messed up RadNumericTextbox Display?

3 posts, 1 answers
  1. Dan
    Dan avatar
    124 posts
    Member since:
    Feb 2011

    Posted 12 Apr 2012 Link to this post

    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" "">
    <head id="Head1" runat="server">
        <style type="text/css">
                color: Red;
                color: Red !important;
        <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" />
        <telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false"
            ReloadOnShow="true" runat="server" EnableShadow="true" />
  2. Dan
    Dan avatar
    124 posts
    Member since:
    Feb 2011

    Posted 13 Apr 2012 Link to this post

  3. DevCraft R3 2016 release webinar banner
  4. Answer
    Tsvetina avatar
    1861 posts

    Posted 18 Apr 2012 Link to this post

    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,
    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.
Back to Top