radnumerictextbox readonly still has clickable text box

2 posts, 0 answers
  1. Ed
    Ed avatar
    1 posts
    Member since:
    Dec 2010

    Posted 10 May 2012 Link to this post

    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">
        <form id="form1" runat="server">
            <style type="text/css">
            text-align: right;
            width: 120px ;

        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" AsyncPostBackTimeout="300">
                <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" />

     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" >

  2. Vasil
    Vasil avatar
    1642 posts

    Posted 15 May 2012 Link to this post

    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,
    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