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

Automatically open a new window

1 Answer 35 Views
Window
This is a migrated thread and some comments may be shown as answers.
Aneesh
Top achievements
Rank 1
Aneesh asked on 22 Jun 2012, 09:41 AM
Hi,

I have a radtextbox. If some text is entered into it, it should open a new window with a textbox which contains the same text in the parent.

Thanks,

Aneesh Daniel

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 22 Jun 2012, 10:08 AM
Hello Aneesh,

Try the following code to achieve your scenario.
aspx:
<telerik:RadTextBox ID="RadTextBox1" runat="server" AutoPostBack="true" ontextchanged="RadTextBox1_TextChanged" ></telerik:RadTextBox>
 <telerik:RadWindowManager ID="RadWindowManager2" runat="server">
 <Windows>
   <telerik:RadWindow ID="RadWindow1" runat="server">
    <ContentTemplate>
      <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    </ContentTemplate>
   </telerik:RadWindow>
 </Windows>
</telerik:RadWindowManager>
C#:
protected void RadTextBox1_TextChanged(object sender, EventArgs e)
{
  RadTextBox rtxt = (RadTextBox)sender;
  RadWindow1.VisibleOnPageLoad = true;
  TextBox txt = (TextBox)RadWindow1.ContentContainer.FindControl("TextBox1");
  txt.Text = rtxt.Text;
}

Thanks,
Shinu.
Tags
Window
Asked by
Aneesh
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or