If I close a tab on tab control how do i reopen it later
utccontractgrid.tabs[1].close;
????????
Hi seeker62,
Your definitely welcome. You may clear the contents of a Tab by accessing the Controls collection of its TabPage, you could then call the Clear() method that is exposed from the page to clear its contents, as demonstrated in the following code.
//Via the Tabs collectionultraTabControl1.Tabs[0].TabPage.Controls.Clear();
// or the discrete Tab instanceultraTabPageControl1.Tab.TabPage.Controls.Clear();
Note that this process will remove all controls from the TabPage* if instead, you are interested in deleting the text contents of discrete controls within that page, then you would need to access and call a method such as ResetText() exposed from these controls, individually and where appropriate.
If you have any further questions regarding this behavior, please let me know.
Sincerely,Chris KDeveloper Support EngineerInfragistics, Inc.www.infragistics.com/support
Thank you for your reply. I can now close a tab and make it reappear. Is there a way to clear the contents of the tab? i.e. put it back as it was before data is entered into the controls(textboxes, comboboxes etc)
Closing a tab effectively hides it without actually removing it from the tabs collection of the UltraTabControl; you will be able to cause this closed tab to re-appear by modifying its Visible property to true, as demonstrated in the following sample code.
//Via the Tabs collectionultraTabControl1.Tabs[0].Visible = true;
//By the discrete TabPage instanceultraTabPageControl1.Tab.Visible = true;