Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

Can you dynamically add a UserControl to a WebTab

Last post 09-04-2008 8:40 by daleroberson. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 09-03-2008 15:48

    Can you dynamically add a UserControl to a WebTab

    Is it possible to dynamically add a UserControl to a WebTab? I can dynamically add a built in control like a textbox to the ContentPane, but I can't seem to get it to work with a UserControl.

     Any thoughts?
    Dale

    • Post Points: 5
  • 09-04-2008 8:40 In reply to

    Re: Can you dynamically add a UserControl to a WebTab

    I ran across another forum that had an example.  Seems I just needed to have the page load the control before adding it to the content pane.

    Dim newTab As Tab = tabPartProducts.Tabs.Add(New Tab)
    With newTab
    .Text = productsList.Value(item.ProductId)
    Dim uc As UserControl = Page.LoadControl("~/controls/edit/MyControl.ascx")
    .ContentPane.Children.Add(uc)
    End With

    Dale

    • Post Points: 5
Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems