ReadOnly RadTextBox has enabled Hover-functionality

3 posts, 0 answers
  1. Jürgen
    Jürgen avatar
    7 posts
    Member since:
    May 2013

    Posted 02 Jul 2013 Link to this post


    I upgraded our Asp.Net application to the current Telerik Ajax version

    Our current production version is: 2012_2_607
    The new version is: 2013_2_611

    In the old version, when a RadTextBox was set as ReadOnly, only the ReadOnlyStyle needed to be applied, hence it doesn't recognize a mouse-hover.
    <telerik:RadTextBox ID="txtSalution" Text='<%# Eval("salutation"%>' runat="server"  Translate="false" AutoPostBack="false" ReadOnly="true"  Width="70px"
        ReadOnlyStyle-Font-Bold="true" ReadOnlyStyle-Font-Size="10" ReadOnlyStyle-BackColor="#F0F0F0" />

    The behaviour of the current version is, that the control recognizes a mouse-hover, as result also the hover-style has to be set.
    <telerik:RadTextBox ID="txtSalution" Text='<%# Eval("salutation"%>' runat="server"  Translate="false" AutoPostBack="false" ReadOnly="true"  Width="70px"
        ReadOnlyStyle-Font-Bold="true" ReadOnlyStyle-Font-Size="10" ReadOnlyStyle-BackColor="#F0F0F0"
        HoveredStyle-Font-Bold="true" HoveredStyle-Font-Size="10" HoveredStyle-BackColor="#F0F0F0" />

    Is this a bug or a "feature"?

    Kind regards

  2. Galin
    Galin avatar
    526 posts

    Posted 05 Jul 2013 Link to this post

    Hi Jürgen,

    To unify the look of our form controls we have improved the behavior of applying the styles of RadInput. In the latest release both Hover and ReadOnly classes (riRead and riHover) are applied at the same time when the input is read-only and it is hovered. During hover, only the hover styles are applied.

    You have 2 options for modifying your code in order to work correct.
    One is to style HorizontalAlign, BorderWidth and Font-Size for both ReadOnly and Hovered styles, even more, it will be best to just use the EnabledStyle without setting the rest, it will be used as base for all other styles during the rendering if they are not set.

    The better option is to style the inputs using the default CssClass riRead or a custom one ReadOnlyStyle-CssClass, to point a class that to be used, instead of adding inline styles.

    I hope this helps.

    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 the blog feed now.
  3. Jürgen
    Jürgen avatar
    7 posts
    Member since:
    May 2013

    Posted 07 Aug 2013 Link to this post

    Hi Galin

    Thank you, .riRead did the trick

    kind regards
Back to Top