Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Dynamically Add Tab in UltraWebTab Control

Please help me, how to delete dynamically created tab in UltraWebTab.for creating tab i am using this code










int tabs = this

.UltraWebTab1.Tabs.Count + 1;



Tab tab = new Tab(Resources


tab.Key =



+ tabs.ToString();





tab.ContentPane.UserControlUrl =






// do not allow to jump size of UltraWebTab when UserControl is too big

tab.ContentPane.Scrollable = Infragistics.WebUI.UltraWebTab.








Please help me how to delete dynamically creatd tab...

  • 24497

    Hi Sandip,

    There are 2 methods Remove(tab) and RemoveAt(index). You may use any of them. Below is example (assume that page has 2 buttons AddTab and RemoveTab and they have corresponding handlers on click).

     protected void AddTab_Click(object sender, EventArgs e)
      int count = this.UltraWebTab1.Tabs.Count;
      Infragistics.WebUI.UltraWebTab.Tab tab = new Infragistics.WebUI.UltraWebTab.Tab("Tab" + count);
      tab.Key = "TabKey" + count;
     protected void RemoveTab_Click(object sender, EventArgs e)
      // find tab by key and remove it
      Infragistics.WebUI.UltraWebTab.Tab tab = this.UltraWebTab1.Tabs.FromKeyTab("TabKey1");
      if(tab != null)
      // remove tab at index
      int tabIndexToRemove = 1;
      int count = this.UltraWebTab1.Tabs.Count;
      if (count > tabIndexToRemove)