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
4110
WebTab tab selection events
posted

Is there a way to capture the event when a web tab is clicked(server side). I've tried the SelectedIndexChange method, but it won't fire. I want to perform an action each time a tab is selected. Inside the ContentTabItem templates I have various controls. What I want to do is hide some controls and change the label text of some labels when a tab is selected.

        <ig:WebTab ID="igMyTabs" runat="server"  Width="900px" StyleSetName="Office2007Blue"
             StyleSetPath="~/ig_res/">
            <Tabs>
                <ig:ContentTabItem runat="server" Text="Apples" >
                    <Template>
      Some stuff to do here
     </Template>
                </ig:ContentTabItem>
                <ig:ContentTabItem runat="server" Text="Oranges">
                    <Template>
                        oranges stuff goes here
                    </Template>
                </ig:ContentTabItem>
                <ig:ContentTabItem runat="server" Text="Bananas">
                    <Template>
                        bananas stuff goes here
                    </Template>
                </ig:ContentTabItem>
             </Tabs>
        </ig:WebTab>

Parents
  • 8160
    Verified Answer
    posted

    Hi dbishop9,

    set AutoPostBackFlags SelectionIndexChanged=On,

        <ig:WebTab ID="igMyTabs" runat="server" Width="900px" StyleSetName="Office2007Blue"
            StyleSetPath="~/ig_res/"
            onselectedindexchanged="igMyTabs_SelectedIndexChanged">
            <AutoPostBackFlags SelectedIndexChanged="On" />
            <Tabs>
                <ig:ContentTabItem runat="server" Text="Apples">
                    <Template>
                        Some stuff to do here
                    </Template>
                </ig:ContentTabItem>
                <ig:ContentTabItem runat="server" Text="Oranges">
                    <Template>
                        oranges stuff goes here
                    </Template>
                </ig:ContentTabItem>
                <ig:ContentTabItem runat="server" Text="Bananas">
                    <Template>
                        bananas stuff goes here
                    </Template>
                </ig:ContentTabItem>
            </Tabs>
        </ig:WebTab>

    ...


        protected void igMyTabs_SelectedIndexChanged(object sender, Infragistics.Web.UI.LayoutControls.TabSelectedIndexChangedEventArgs e)
        {

        }

     

Reply Children