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
70
Help with UltraGrid and UltraTabControl
posted

Hi,

     I have a problem because i'm rookie in .NET and Infragistics. My problem is this:

 I have a UltraTabControl and I want to create new TAB in execution time, at time i need to insert one UltraGrid in each new TAB.

 For example, i have a table with 5 countrys (c1,c2,c3,c4,c5)

I want on tab for country, but if i'll add a new country i need to appear this.

After that in each tab i ned a Ultra Grid to show all invoices that this country.

 

HELP i'm LOST!!!!!

Thanks.

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi,

    Which part of this are you lost on? 

    There are a couple of ways you can do this. 

    If you are going to have a lot of tabs, you might be able to save memory by using UltraTabStrip instead of UltraTabControl. Basically, UltraTabStrip simulates having lots of tabs, but there's really only one tab. So it appears to the user that there are lots of tabs, but the contents of the tab stay the same. So in this case, you would add all your tabs, or you could even bind the UltraTabStrip to a data source to create the tabs for you. Then you would just have a single grid on the TabStrip and you would trap the SelectedTabChanged event of the TabStrip and change the data source of the grid to match the active tab. This way you only have to create one grid and it saves a lot of resources.

    The other method is to use UltraTabControl and create a grid on each tab. Creating tabs at run-time is pretty easy - you just use the UltraTabControl.Tabs.Add method. To place a control on a tab, you do something like this: 

    ultraTabControl1.Tabs[0].TabPanel.Controls.Add(myControl)

Reply Children
No Data