PageView Saving in RadTabs

6 posts, 0 answers
  1. Lynne
    Lynne avatar
    13 posts
    Member since:
    Apr 2008

    Posted 23 May 2013 Link to this post

    I dynamically create tabs which then have pageviews attached to them which use a ContentURL.  When the user clicks on the submit button on the main page I want to be able to save user input in textboxes in the various pageviews.  I have seen examples which demonstrate tabs being filled with usercontrols and then using the FindControl function to get to textboxes.  How can I find textboxes in PageViews created with ContentURL? 

    This is how I load my pageviews.
    Private Sub AddPageView(ByVal pageViewID As String, oTab As RadTab, sURLNav As String)
     
        Try
     
            Dim pageView As RadPageView = New RadPageView
            pageView.ID = "PV" + pageViewID
            oTab.PageViewID = "PV" + pageViewID
            pageView.Height = 520
            pageView.ContentUrl = sURLNav
            MainMultiPage.PageViews.Add(pageView)
     
        Catch ex As Exception
     
        End Try
     
    End Sub

     

  2. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 28 May 2013 Link to this post

    Hello Lynne,

    Thank you for contacting Telerik Support.

    Since the set in the ContentUrl property page is loaded in an iframe, you cannot get direct access to the nested controls. I would suggest you to expose the needed controls with a function and access them from the iframe's ContentWindow. I have prepared  sample page for you demonstrating the above suggestion. Please find it attached and let me know if it works properly at your end.

    Hope this would help. I will be glad to assist you any further.

    Regards,
    Nencho
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Lynne
    Lynne avatar
    13 posts
    Member since:
    Apr 2008

    Posted 29 May 2013 Link to this post

    Thanks so much!  I have tried your sample project and it worked.  Is there a way on the server side to get the data?  Can this only work on the client side? I would like to use the code behind for the submit button on the main page to get the values of the textboxes in the pageview that has a contentURL.
  5. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 03 Jun 2013 Link to this post

    Hello Lynne,

    You could use a HiddenField to store the needed data and access it at server-side when needed. I have slightly modified the previously provided sample, in order to demonstrate this approach. Please find the attachment.

    Regards,
    Nencho
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Lynne
    Lynne avatar
    13 posts
    Member since:
    Apr 2008

    Posted 19 Jun 2013 Link to this post

    Thanks!  That was very helpful.
    I actually get a lot of data from the user which is in a table and I want to add the table to a pageView on the clientside.  If were doing this on the server side I could use the following code:

     

    pageView.Controls.Add(DefaultTable)

    However, I don't know how to do this on the client side. 

  7. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 24 Jun 2013 Link to this post

    Hi Lynne,

    One possible approach that you can use is to set the content url (that will point to the page containing the table) of the RadPageView on the client side using the following code pageview.set_contentUrl("someurl"); as explained here.

    Regards,
    Kate
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017