Hi,
We are upgrading from Infragitics NetAdvantage 2010.2 to Infragistics NetAdvantage 2013.1. In previous version,
UltraWebTab was used and now we need to use WebTab as UltraWebTab is obslete.
1) Below is RoundedImage tag for UltraWebTab in our project
<RoundedImage FillStyle="LeftMergedWithCenter" HoverImage="[ig_tab_winXP2.gif]" LeftSideWidth="7"
NormalImage="[ig_tab_winXP3.gif]" RightSideWidth="6" SelectedImage="[ig_tab_winXP1.gif]"
ShiftOfImages="2" />
How to define RoundedImage tag for WebTab.
2) We have Default.aspx page which has WebTab and on one tab usercontrol is added using below code.
<ig:WebTab ID="UltraWebTab1" runat="server" Height="100%" Width="100%" OnDataBinding="UltraWebTab1_DataBinding" EnableViewState="True" OnSelectedIndexChanged="UltraWebTab1_OnSelectedIndexChanged">
<AutoPostBackFlags SelectedIndexChanged="On" />
<Tabs>
<ig:ContentTabItem runat="server" Text="Reports" Key="Reports" UserControlUrl="ReportList.ascx"></ig:ContentTabItem>
</Tabs>
<PostBackOptions EnableLoadOnDemandUrl="True" EnableAsyncUpdateAllTabs="True" EnableReloadingOnTabClick="True"></PostBackOptions>
< TabItemCssClasses CssClass="webTabStyle" ActiveCssClass="defaultTabStyle" SelectedCssClass="selectedTabStyle"></TabItemCssClasses>
</ig:WebTab>
Now, usercontrol has various controls like grid, textbox and method related to these grid.
Usercontrol CDF has a method A() and has grid named ABC
void A()
{
ABC.Datasource = CreateDataSource();
ABC.DataBind();
}
public CDF[] CreateDataSource()
...
and this A() method has to be called on Default.aspx page. When i was using UltraWebTab this usercontrol method was accessed as below
CDF aCDF = UltraWebTab1.SelectedTabObject.ContentPane.UserControl as CDF;
aCDF.A();
But with WebTab how it has to used. Tried with below method but controls are null.
CDF aCDF = UltraWebTab1.Tabs[0].Controls[0].Controls as CDF;
How do. Please guide.
Hello Renuka,
Thank you for posting in our forum.
There’s no such property available for the new WebTab control. Instead if you’re aiming to make the tabs circular you can style the related WebTab css styles in order to achieve this effect. A possible approach is discussed here:
http://ko.infragistics.com/community/forums/t/71676.aspx
The first control in the tab will be the template container. You need the next control which will be its first child. For example:
WebUserControl c = (WebUserControl)this.WebTab1.Tabs[0].Controls[0].Controls[0];
I’ve attached a sample for your refrence in which some styles are applied to the tabs so that they appear rounded and a WebUserControl’s method is called on Page_Load by retrieving it from the related tab. Please refer to the sample and let me know if you have any questions.
Best Regards,
Maya Kirova
Developer Support Engineer II
Infragistics, Inc.
http://ko.infragistics.com/support
WebUserControl c = (WebUserControl)this.WebTab1.Tabs[0].Controls[0].Controls[0]; is not helpful in my condition because, i want replace below line of code.
ReportJobLog rptJobLog = UltraWebTab1.SelectedTabObject.ContentPane.UserControl as ReportJobLog;
rptJobLog- is user control , after this i am calling BindData method. We are using Infragitics 13.1 and it is not having WebUserControl so it doesnt get identified at the line mentioned .
Please guide uregent help is required, majorly stucked.
Hello,
“WebUserControl” in the case of the attached sample is the name of the user control that you can find in the attachment: WebUserControl.ascx
So the following code gets the instance of the User Control, casts it to the related type, which is the name of the user control, and then calls a method specific to that user control:
c.CustomMethod();
Please open the attached sample, test it on your side and let me know if you have any questions.
check with UserControl, still getting error of object cant be mapped.
On the default page, i just want all user control get initialized and i am able to access usercontrol specified method. Currently getting null in the usercontrol when tired with above line of code. Please guide
Hello Renuka ,
I’m just following up to see if you’ve been able to resolve your issue. If you have any questions or concerns or if you need further assistance please let me know.
Developer Support Engineer
http://www.infragistics.com/support