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
120
Set ContentURL of ContentTabItem using Javascript
posted

Hello

I would like to set change the ContenURL of a tab item using javascript. I checked out the Documentation and it references getting an instance of LayoutPane. However I can't figure out what methods to call to return an instance of this object?

http://help.infragistics.com/Help/NetAdvantage/ASPNET/2010.1/CLR3.5/html/WebTab~Infragistics.Web.UI.LayoutPane_members.html

I have attached my html for reference

 

<div id="WebTabContainer">
                            <ig:WebTab ID="WebTab1" runat="server" ScrollButtons-AutoHide="true" Width="99%" Height="700px">
                                <Tabs>
                                    <ig:ContentTabItem runat="server" Text="Empty" >
                                    </ig:ContentTabItem>
                                    <ig:ContentTabItem runat="server" Text="Branches" ScrollBars="Hidden" ContentUrl="Branches.aspx">
                                    </ig:ContentTabItem>
                                    <ig:ContentTabItem runat="server" Text="Members" ScrollBars="Hidden" ContentUrl="Members.aspx">
                                    </ig:ContentTabItem>
                                    <ig:ContentTabItem runat="server" Text="RRCodes" ScrollBars="Hidden" ContentUrl="RRCodes.aspx">
                                    </ig:ContentTabItem>
                                    <ig:ContentTabItem runat="server" Text="Clients" ScrollBars="Hidden" ContentUrl="Clients.aspx">
                                    </ig:ContentTabItem>
                                    <ig:ContentTabItem runat="server" Text="Accounts" ScrollBars="Hidden" ContentUrl="Accounts.aspx">
                                    </ig:ContentTabItem>
                                    <ig:ContentTabItem runat="server" Text="Orders" ScrollBars="Hidden" ContentUrl="Orders.aspx">
                                    </ig:ContentTabItem>
                                </Tabs>
                                <ClientEvents UrlLoaded="UltraWebTab1_AfterSelectedTabChange" />
                                <PostBackOptions  EnableLoadOnDemandUrl="True" EnableLoadOnDemand="true" EnableAjax="true"  />
                                <AjaxIndicator Enabled="True" Location="MiddleCenter" />
                            </ig:WebTab>

Parents
No Data
Reply
  • 995
    posted

    Hi,

    When ActiveTabChange client side event fires, the second argument TabItemCancelEventArgs will be holding selected TabItem index that could be used as a argument for getTabAt method. Once you reference the selected tab you can use get_contentUrl(),set_contentUrl()methods to manupalate the Url string like:

    function Change(sender, e) {

                var tab = sender.getTabAt(e.get_tabIndex());

                alert(tab.get_contentUrl());

            }

     

    I hope this, helps. Please let me know if you need further assistance on this case.

     

     

    Sincerely,

    Batnasan

    Developer Support Engineer, MCAD

    Infragistics

    www.infragistics.com/support

     

     

     

Children