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

TextBox Works as OpenerElement but RadTextBox Does Not

1 Answer 61 Views
Window
This is a migrated thread and some comments may be shown as answers.
PJ Melies
Top achievements
Rank 1
PJ Melies asked on 17 Oct 2008, 04:20 PM
I currently have a form where an asp:TextBox is set as the OpenerElement of a RadWindow and it works fine.  However, I want to replace the TextBox with a RadTextBox and when I did that the RadWindow no longer opened and I don't know why.

Here's some sample code to illustrate this problem.

<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />

<telerik:RadTextBox ID="radTextBox" Columns="30" ReadOnly="true" text="RadTextBox" runat="server" />
<asp:TextBox ID="aspTextBox" Columns="30" ReadOnly="true" text="AspTextBox" runat="server" />

<telerik:RadWindowManager ID="RadWindowManager1" runat="server">
<Windows>
<telerik:RadWindow ID="rwFindBranch" runat="server"
OpenerElementId="<%# radTextBox.ClientID %>"
NavigateUrl="http://www.telerik.com" />

<telerik:RadWindow ID="rwFindBranch2" runat="server"
OpenerElementId="<%# aspTextBox.ClientID %>"
NavigateUrl="http://www.google.com" />
</Windows>
</telerik:RadWindowManager>

</form>

1 Answer, 1 is accepted

Sort by
0
Accepted
Georgi Tunev
Telerik team
answered on 20 Oct 2008, 07:36 AM
Hi PJ Melies,

The reason for this behavior is that RadTextBox's ClientID is assigned to a hidden element. What you can do in such case is to set the property like this:

OpenerElementID='<%#radTextBox.ClientID + "_text" %>'


All the best,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
PJ Melies
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or