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

Get User Data from Dynamic Control in RadWindow

1 Answer 132 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Daniel asked on 01 Oct 2014, 12:34 PM

I am working on a project with a RadWindow.
Controls are added dynamically to the RadWindow. (TextBox, radioButton CheckBox etc.)
The user can enter data into the dynamic controls. 

My ASPX code::
<telerik:RadWindow runat="server" ID="RadWindow2">
                            <telerik:RadAjaxPanel ID="MyPopUp_RadAjaxPanel1" runat="server" Width="90%"></telerik:RadAjaxPanel>
                            <asp:UpdatePanel ID="Updatepanel1" runat="server" UpdateMode="Conditional">
                                    <asp:Button ID="Button_Ajax" Text="Click for AJAX" runat="server" OnClick="Button_Ajax_Click" />
                                    <br />
                                    <asp:Label ID="Label1" Text="I will be updated" runat="server" />
  <telerik:RadButton ID="btn_win2" runat="server" Text="win 2">

   Protected Sub btn_win2_Click(sender As Object, e As EventArgs) Handles btn_win2.Click
       Dim lbl As Label = New Label()
       Dim txt As TextBox = New TextBox()
       txt.ID = "txb_win2"
       lbl.ID = "lbl_win2"
       lbl.Text = "new lbl"
       RadWindow2.VisibleOnPageLoad = True
       'RadWindow2.Width = 500
       'RadWindow2.Height = 300
       RadWindow2.Modal = True
       RadWindow2.CenterIfModal = True
   End Sub
Protected Sub Button_Ajax_Click(sender As Object, e As EventArgs)
       RadWindow2.VisibleOnPageLoad = False
       lbl_NewUserData.Text = ""
       'Dim panel As RadAjaxPanel = TryCast(RadWindow2.ContentContainer.FindControl("MyPopUp_RadAjaxPanel1"), RadAjaxPanel)
       For Each ct In RadAjaxPanel1.Controls
           lbl_NewUserData.Text += ct.ToString() + vbCrLf
   End Sub

How can I access the controls and the data which the user entered?
I want to retrieve this information when the user clicks a button.



1 Answer, 1 is accepted

Sort by
Marin Bratanov
Telerik team
answered on 02 Oct 2014, 11:46 AM

Hello Daniel,

Her are some resources that should help you with this:

I hope this helps get you started.


Marin Bratanov

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Asked by
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question