AssociatedControlID not working for RadTextBox

2 posts, 0 answers
  1. John Smith
    John Smith avatar
    8 posts
    Member since:
    Feb 2010

    Posted 04 Mar 2010 Link to this post

    I'm trying to use the asp:label control with the AssociatedControlID attribute referring to the ID attribute in a telerik:RadTextBox, let's say ID="XXX".  It does not work, no focus is put in the field when the label is clicked.  After viewing the source you can see why, there is a hidden field with ID="XXX" and a visible field with ID="XXX_Text".  I switch the telerik:RadTextBox to asp:textbox and it works.  I consider this a bug, do others agree?

    Works...
    <asp:Label ID="NameFirst_label" runat="server" Text="First Name:" AssociatedControlID="NameFirst" />
    <asp:TextBox ID="NameFirst" runat="server" />

    Doesn't work...
    <asp:Label ID="NameFirst_label" runat="server" Text="First Name:" AssociatedControlID="NameFirst" />
    <telerik:RadTextBox ID="NameFirst" runat="server" />
  2. Dimo
    Admin
    Dimo avatar
    8486 posts

    Posted 05 Mar 2010 Link to this post

    Hi John,

    Your observations are correct, however, we do not regard this as a bug. You can either use the RadTextBox native label (set the Label property) or alternatively, you can use a <label runat="server"> and set its for attribute programmatically to the client ID of RadTextBox + "_text".


    Greetings,
    Dimo
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top