Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Infragistics - Active Tab - AddControl Method

Status
Not open for further replies.

tb

Programmer
May 27, 2003
328
Hi all,

This is my scenario ...

I have a form that contains the following Infragistics controls:
Active Tab (2 tabs by default - "Sample 1" and "Add New")
Active panel
Ultra grid

On the click of the "Add New" tab I create another tab on the fly and rename it to "Sample 2" and change the index so that I get the following ...
"Sample 1" / "Sample 2" / "Add New"

The tab called "Sample 2" now has to contain an active panel and an ultra grid

I populate the controls with LOAD and set the visibility to TRUE.

Now this is where I get stuck ... I can't seem to get the controls on the tab called "Sample 2"

Here is my code ...

tabSample.Tabs.Add "Sample (" & tabSample.Tabs.Count & ")", , tabSample.Tabs.Count

tabSample.Tabs(tabSample.Tabs.Count - 1).Selected = True

Load pnlSample(pnlSample.Count)
Load grdSample(grdSample.Count)

pnlSample(pnlSample.Count - 1).Visible = True
grdSample(grdSample.Count - 1).Visible = True

tabSample.Tabs(pnlSample.Count - 1).TabPanel.AddControl pnlSample(pnlSample.Count - 1)
tabSample.Tabs(pnlSample.Count - 1).TabPanel.AddControl grdSample(grdSample.Count - 1)

Any ideas on why my code isn't working or another way of accomplishing my goal will be much appreciated.

tb
[flowerface]

I was standing in the park, wondering why frisbees got bigger as they came closer... then it hit me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top