Get User Data from Dynamic Control in RadWindow

2 posts, 0 answers
  1. Daniel
    Daniel avatar
    159 posts
    Member since:
    Feb 2014

    Posted 01 Oct 2014 Link to this post


    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.


  2. Marin Bratanov
    Marin Bratanov avatar
    3907 posts

    Posted 02 Oct 2014 Link to this post

    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.

Back to Top