Hi,
I am new to infragistics and stucked at one place.
In my application I am using WebTab control inside ajax <UpdatePanel> . There are three tabs inside WebTab. I want to keep the background color of tab header different for all three tabs. Also depend on some condition change i want to change the header background color of tabs at runtime also.
Any idea?
Thanks,
Mit
Hello Mitesh,
Samples: http://samples.infragistics.com/2010.3/WebFeatureBrowser/Default.aspx Navigate to WebTab,Complete online documentation http://help.infragistics.com/NetAdvantage/ASPNET/2010.3/CLR4.0/?page=Web_WebTab.htmlProperties and events: http://help.infragistics.com/NetAdvantage/ASPNET/2010.3/CLR4.0/?page=Infragistics4.Web.v10.3~Infragistics.Web.UI.LayoutControls.WebTab_members.html
Hi Hristo,
Thanks for the sollution. This has solved my problem. Also can you please refer me some good links to get complete information on webtab, its properties and events?
Hello,
To change tab’s background you need to change tab css style. Due to your tab is in update panel you can set <AutoPostBackFlags SelectedIndexChanged="On" /> and then to subscribe for WebTab1_SelectedIndexChanged event. Then you can check for some condition:
protected void WebTab1_SelectedIndexChanged(object sender, Infragistics.Web.UI.LayoutControls.TabSelectedIndexChangedEventArgs e)
{
this.WebTab1.Tabs[0].TabCssClasses.CssClass = "TabSelected1";
//If clicked tab is the second
if (e.NewIndex == 1)
//Change CenterSelectedCssClass
this.WebTab1.TabItemCssClasses.CenterSelectedCssClass = "TabSelected";
}
Sample: WebTab - Styling WebTab's Tab States
When do you want to change background color, when the Tab is initialized or when you switching between the tabs?