locked
Tab Container RRS feed

  • Question

  • User-1240662851 posted

    Hi all,

      Iam using ajax tab container in this i need to enable the tab panels one by one and i want show the header of that panel if i write like this TabPanel2.Enabled = false;header will be disappearing but i want to display header in disable mode is there any other way to do  this  

    Wednesday, February 17, 2016 12:09 PM

Answers

  • User61956409 posted

    Hi Prakash,

    i write like this TabPanel2.Enabled = false;header will be disappearing but i want to display header in disable mode

    I create a sample on my side to reproduce your problem, I find that the header of TabPanel will not disappear when I disable the TabPanel.

    <asp:TabContainer ID="Tabs" runat="server" ActiveTabIndex="0" Height="128px"
        Width="332px" OnDemand="true">
        <asp:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1" OnDemandMode="Once">
            <ContentTemplate>
                I'm tab 1, I was rendered at
                       
                <%= DateTime.Now.ToString("T") %>
                <br />
                My OnDemandMode is &#39;Once&#39;
                   
            </ContentTemplate>
        </asp:TabPanel>
        <asp:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2" OnDemandMode="Always">
            <ContentTemplate>
                I'm tab 2, I was rendered at
                       
                <%= DateTime.Now.ToString("T") %>
                <br />
                My OnDemandMode is &#39;Always&#39;
                   
            </ContentTemplate>
        </asp:TabPanel>
        <asp:TabPanel ID="TabPanel3" runat="server" HeaderText="TabPanel3" OnDemandMode="None">
            <ContentTemplate>
                I'm tab 3, I was rendered at
                       
                <%= DateTime.Now.ToString("T") %>
                <br />
                My OnDemandMode is &#39;None&#39;
                   
            </ContentTemplate>
        </asp:TabPanel>
        <asp:TabPanel ID="TabPanel4" runat="server" HeaderText="TabPanel4" OnDemandMode="Once">
            <ContentTemplate>
                I'm tab 4. Hey, I&#39;m loaded only once!<br />
                I was rendered at
                       
                <%= DateTime.Now.ToString("T") %>
            </ContentTemplate>
        </asp:TabPanel>
    </asp:TabContainer>
    
    protected void Page_Load(object sender, EventArgs e)
    {
        TabPanel2.Enabled = false;
    }
    

    Best Regards,

    Fei Han



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 18, 2016 3:09 AM

All replies

  • User61956409 posted

    Hi Prakash,

    i write like this TabPanel2.Enabled = false;header will be disappearing but i want to display header in disable mode

    I create a sample on my side to reproduce your problem, I find that the header of TabPanel will not disappear when I disable the TabPanel.

    <asp:TabContainer ID="Tabs" runat="server" ActiveTabIndex="0" Height="128px"
        Width="332px" OnDemand="true">
        <asp:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1" OnDemandMode="Once">
            <ContentTemplate>
                I'm tab 1, I was rendered at
                       
                <%= DateTime.Now.ToString("T") %>
                <br />
                My OnDemandMode is &#39;Once&#39;
                   
            </ContentTemplate>
        </asp:TabPanel>
        <asp:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2" OnDemandMode="Always">
            <ContentTemplate>
                I'm tab 2, I was rendered at
                       
                <%= DateTime.Now.ToString("T") %>
                <br />
                My OnDemandMode is &#39;Always&#39;
                   
            </ContentTemplate>
        </asp:TabPanel>
        <asp:TabPanel ID="TabPanel3" runat="server" HeaderText="TabPanel3" OnDemandMode="None">
            <ContentTemplate>
                I'm tab 3, I was rendered at
                       
                <%= DateTime.Now.ToString("T") %>
                <br />
                My OnDemandMode is &#39;None&#39;
                   
            </ContentTemplate>
        </asp:TabPanel>
        <asp:TabPanel ID="TabPanel4" runat="server" HeaderText="TabPanel4" OnDemandMode="Once">
            <ContentTemplate>
                I'm tab 4. Hey, I&#39;m loaded only once!<br />
                I was rendered at
                       
                <%= DateTime.Now.ToString("T") %>
            </ContentTemplate>
        </asp:TabPanel>
    </asp:TabContainer>
    
    protected void Page_Load(object sender, EventArgs e)
    {
        TabPanel2.Enabled = false;
    }
    

    Best Regards,

    Fei Han



    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 18, 2016 3:09 AM
  • User-1240662851 posted

    Its not working when i disable tabpanel header will be disappearing  

    Thursday, February 18, 2016 11:14 AM
  • User61956409 posted

    Hi Prakash,

    Its not working when i disable tabpanel header will be disappearing  

    I have shared my sample code with screenshot, the header of TabPanel does not disappear when I disable TabPanel. Could you share us more your relevant code and screenshots?

    Best Regards,

    Fei Han

    Friday, February 19, 2016 8:23 AM