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

radnumerictextbox readonly still has clickable text box

1 Answer 146 Views
Input
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Ed asked on 10 May 2012, 01:11 PM
when you bring up this page you'll see a read only radnumerictextbox that is right-aligned in read only mode - it lets you click in the number area with the mouse or tab over to it.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">




<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <style type="text/css">
            .RadNumericTextBoxRules
    {
        text-align: right;
    }
    
        .Local_RadNumericTextBox
    {
        width: 120px ;
    }
    </style>




    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" AsyncPostBackTimeout="300">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>




 Read Only
                    <telerik:RadNumericTextBox runat="server" ID="RadNumericTextBox2"
                        CssClass="Local_RadNumericTextBox RadNumericTextBoxRules" DataType="System.Int32"
                        NumberFormat-DecimalDigits="0" Width="120px" ReadOnly="true" ReadOnlyStyle-BackColor="White" ReadOnlyStyle-BorderColor="White"
    ReadOnlyStyle-BorderStyle="None" ReadOnlyStyle-BorderWidth="0" ReadOnlyStyle-ForeColor="#53626F"
    Border-Color="White" BorderStyle="None" border-width="0" Value="123.23" >
                    </telerik:RadNumericTextBox>




    </div>
    </form>
</body>
</html>

1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 15 May 2012, 07:11 AM
Hi Ed,

This is the normal behavior of input elements in the HTML form. You will get the same result with this markup:

<input type="text" readonly="readonly" value="123" />

As alternative you may set Enabled ="false" to the input in order to disable it. This way it will be nonclickable.

Kind regards,
Vasil
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
Ed
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or