Tab Click on Same Tab

4 posts, 0 answers
  1. Venkata
    Venkata avatar
    126 posts
    Member since:
    Nov 2009

    Posted 27 Mar 2014 Link to this post

    Hello,
    I have a 3 Tabs on my page(Tab1, Tab2, Tab3)
    Let say if user click on the Tab2 and page got loaded. If User clicks on the same Tab2 again.. i want to reload the the page again

    how can i do this?

    Thank You
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 27 Mar 2014 in reply to Venkata Link to this post

    Hi Venkata,

    Please try the following sample code snippet to achieve your scenario.

    ASPX:
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1"
        OnTabClick="RadTabStrip1_TabClick1">
        <Tabs>
            <telerik:RadTab Text="Tab1" PageViewID="RadPageView1" onclick="click();">
            </telerik:RadTab>
            <telerik:RadTab Text="Tab2" PageViewID="RadPageView2" onclick="click();">
            </telerik:RadTab>
            <telerik:RadTab Text="Tab3" PageViewID="RadPageView3" onclick="click();">
            </telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>
    <telerik:RadMultiPage ID="RadMultiPage1" runat="server">
        <telerik:RadPageView ID="RadPageView1" runat="server" ContentUrl="AddUserControlPageView.aspx">
        </telerik:RadPageView>
        <telerik:RadPageView ID="RadPageView2" runat="server" ContentUrl="CancelClick.aspx">
        </telerik:RadPageView>
        <telerik:RadPageView ID="RadPageView3" runat="server" ContentUrl="ChangeTabFromClientside.aspx">
        </telerik:RadPageView>
    </telerik:RadMultiPage>

    JavaScript:
    <script type="text/javascript">
        function click() {
            __doPostBack();
        }
    </script>

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nencho
    Admin
    Nencho avatar
    1458 posts

    Posted 28 Mar 2014 Link to this post

    Hello Venkata,

    I would suggest you to simply set the ClickSelectedTab of the RadTabStrip to true. Thus, if a certain tab is already selected, you will have the ability to select it again and reload the page, referenced in the ContentUrl.

    Regards,
    Nencho
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
  5. Venkata
    Venkata avatar
    126 posts
    Member since:
    Nov 2009

    Posted 28 Mar 2014 in reply to Shinu Link to this post

    Thank you Shinu's  for your reply..

    But i got resolved my problem with set the bellow setting
    ClickSelectedTab="true" 
Back to Top