I have a .ascx control that contains my UltraWebTab and within my UltraWebTab i have 4 tabs that are each a control. i am trying to pass 2 properties from the main page to each tab and for the licfe of me can not figure out how to get them into the tab controls. i can get them from the main page into the control that contains the UltraWebTab but i can nto get them from there tio the individual tabs.
any thougths, suggestions?
i'm using 9.2 btw
Hi Shawn,
If I understood correctly you want to find reference to a child control located in ContentPane of TabItem. If that is the case, then you should use standard method of dot-net FindControl. Since you have chain of naming containers, you should search through all of them in exact order. For example, you have TextBox2 located in first tab of WebTab located in WebUserControl2. Below are codes to get reference to that field:
WebUserControl2 user = this.FindControl("WebUserControl21") as WebUserControl2; if(user == null) return; Infragistics.WebUI.UltraWebTab.UltraWebTab webtab = user.FindControl("UltraWebTab1") as Infragistics.WebUI.UltraWebTab.UltraWebTab; if(webtab == null) return; TextBox tbOnTab1 = webtab.Tabs.GetTab(0).FindControl("TextBox2") as TextBox; if(tbOnTab1 != null) tbOnTab1.Text = "ok";
Viktor,
Can you help with a similar problem finding control within a WebTab (not an UltraWebTab)?
WebTab seems to have no ("Tabs.GetTab(0).FindControl") string. I can use "Tabs[1].FindControl", but the control name comes up with an "Object not set to an instance" error.
I'm not trying to set control values, by the way, I'm trying to retrieve them.
thanks,
Badger98023