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
445
Define RoundedImage property and how to access Usercontrol in WebTab
posted

Hi,

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.

 

Parents
  • 29417
    Offline posted

    Hello Renuka,

     

    Thank you for posting in our forum.

     

    1. 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

       

    2. 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

     

    webtab.zip
Reply Children