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

AssociatedControlID not working for RadTextBox

1 Answer 107 Views
Input
This is a migrated thread and some comments may be shown as answers.
John Smith
Top achievements
Rank 1
John Smith asked on 05 Mar 2010, 04:34 AM
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" />

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 05 Mar 2010, 09:45 AM
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.
Tags
Input
Asked by
John Smith
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or