Tab Not change

6 posts, 0 answers
  1. Shakti SIngh Dulawat
    Shakti SIngh Dulawat avatar
    89 posts
    Member since:
    Oct 2009

    Posted 20 Aug 2012 Link to this post

    I have a bit strange issue in my tab , when I am trying to change the tab run time , it will select the tab but does not show tab page view!

    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderContent" runat="server">
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanelDemo" runat="server" Skin="Metro">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxManagerProxy ID="radAjaxManagerAllBetsDifficultToRead" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="ucAllBetsDifficultToRead">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="ucBetsDifficultToReadDetail" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="radMultiPageAllBetsDifficultToRead">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="radTabStripAllBetsDifficultToRead" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManagerProxy>
        <div id="maincontent" class="tabpage">
            <telerik:RadTabStrip ID="radTabStripAllBetsDifficultToRead" runat="server" SelectedIndex="0"
                Skin="Metro" MultiPageID="radMultiPageAllBetsDifficultToRead">
                <Tabs>
                    <telerik:RadTab runat="server" Text="All Bets" Selected="True">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" Text="Selected Bets">
                    </telerik:RadTab>
                </Tabs>
            </telerik:RadTabStrip>
            <telerik:RadMultiPage ID="radMultiPageAllBetsDifficultToRead" runat="server" SelectedIndex="0"
                CssClass="pageView" Width="98%">
                <telerik:RadPageView ID="radPageViewTakeBet" runat="server">
                    <br />
                    <uc1:AllBetsDifficultToRead ID="ucAllBetsDifficultToRead" runat="server" OnCheckClick="UcAllBetsDifficultToReadClick" />
                    <br />
                </telerik:RadPageView>
                <telerik:RadPageView ID="radPageViewTranslate" runat="server">
                    <br />
                    <uc2:BetsDifficultToReadDetail ID="ucBetsDifficultToReadDetail" runat="server" />
                    <br />
                </telerik:RadPageView>
            </telerik:RadMultiPage>
            <br />
            <br />
        </div>
    </asp:Content>

    Any one suggest me some idea for it!
    All I am doing is one a user control Handler I am trying to change the tab index!
    protected void UcAllBetsDifficultToReadClick(object sender, EventArgs e)
           {       
               
               radMultiPageAllBetsDifficultToRead.SelectedIndex = 1;
              radTabStripAllBetsDifficultToRead.Tabs[1].Selected = true;
               radMultiPageAllBetsDifficultToRead.PageViews[1].Selected = true;
     
              // radMultiPageAllBetsDifficultToRead.SelectedIndex = 1;
           }

    Thanks for the time!

  2. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 21 Aug 2012 Link to this post

    Hello Shakti,

    Unfortunately, I could not replicate the issue you are experiencing. I have prepare a sample using the provided code snippet so you could test it locally and check whether there are any differences that may cause the problem at your end.

    All the best,
    Nencho
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Shakti SIngh Dulawat
    Shakti SIngh Dulawat avatar
    89 posts
    Member since:
    Oct 2009

    Posted 21 Aug 2012 Link to this post

    Thanks for your time on it, As I check it will move the next tab but  the problem is it still display the first tab user control , where we want to display second tab user control once it move!
    Let me know if you want me to make a test project for you if you are not able to understand the issue!

    Thanks,
    Shakti
  5. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 22 Aug 2012 Link to this post

    Hello Shakti,

    Could you provide us a runnable sample, as you suggested, so we could examine the problem locally and find a solution for the experienced issue?

    Kind regards,
    Nencho
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  6. Hubert
    Hubert avatar
    19 posts
    Member since:
    Feb 2012

    Posted 24 Aug 2012 Link to this post

    Hi,

    Nencho's sample works, but the reason is the lack of Ajax.
    When you implement the AjaxManager, LoadingPanel and so on like Shakti did, the selected tab
    does not change, but the multipage view.

    Maybe this is the same problem as in How to change progmatically active tab in radtabstrip radmultipage

    I can not attach my sample solution, but it's very easy to build.
    In the sample you can select a TabStrip by a ListBox.
    The non Ajax version works, but after removing the comment in the Default.aspx file on line 47 and 69
    to activate Ajax, the TabStrip does not change anymore but the pageview.

    Just create a new project and change the Default.aspx file to
    <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
        CodeBehind="Default.aspx.cs" Inherits="TestTabSwitch._Default" %>
     
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    </asp:Content>
    <asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI"
                Name="Telerik.Web.UI.Common.Core.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI"
                Name="Telerik.Web.UI.Common.jQuery.js">
            </asp:ScriptReference>
            <asp:ScriptReference Assembly="Telerik.Web.UI"
                Name="Telerik.Web.UI.Common.jQueryInclude.js">
            </asp:ScriptReference>
        </Scripts>
    </telerik:RadScriptManager>
        <h2>
            Welcome to ASP.NET!
        </h2>
        <p>
            To learn more about ASP.NET visit <a href="http://www.asp.net" title="ASP.NET Website">
                www.asp.net</a>.
        </p>
        <p>
            You can also find <a href="http://go.microsoft.com/fwlink/?LinkID=152368&;clcid=0x409"
                title="MSDN ASP.NET Docs">documentation on ASP.NET at MSDN</a>.
        </p>
         
        <div>
            <telerik:RadListBox runat="server" OnSelectedIndexChanged="IndexChanged" ID="DaListBox" SelectionMode="Single" AutoPostBack="True">
                <Items>
                    <telerik:RadListBoxItem runat="server" Text="tab 1"/>
                    <telerik:RadListBoxItem runat="server" Text="tab 2"/>
                    <telerik:RadListBoxItem runat="server" Text="tab 3"/>
                </Items>
            </telerik:RadListBox>
        </div>
     
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server"
            Skin="Default">
        </telerik:RadAjaxLoadingPanel>
         
    <%--
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="DaListBox">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                        <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadMultiPage1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" />
                        <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
    --%>
     
        <telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1">
            <Tabs>
                <telerik:RadTab runat="server" Text="seite 1" />
                <telerik:RadTab runat="server" Text="seite 2" />
                <telerik:RadTab runat="server" Text="seite 3" />
            </Tabs>
        </telerik:RadTabStrip>
     
        <telerik:RadMultiPage ID="RadMultiPage1" runat="server">
            <telerik:RadPageView ID="RadPageView1" runat="server">
                RadPageView
            </telerik:RadPageView>
            <telerik:RadPageView ID="Pageview1" runat="server">
                Name: John Smith<br />
                Birthday: October 20th 1976<br />
                Marital Status: Single
                <br />
            </telerik:RadPageView>
            <telerik:RadPageView ID="Pageview2" runat="server">
                ... Content of the Pageview2 ...
            </telerik:RadPageView>
        </telerik:RadMultiPage>
    </asp:Content>

    and add the following method in the Default.aspx.cs
    protected void IndexChanged(object sender, EventArgs e)
            {
                RadTabStrip1.SelectedIndex = DaListBox.SelectedIndex;
                RadMultiPage1.PageViews[DaListBox.SelectedIndex].Selected = true;
                RadTabStrip1.Tabs[DaListBox.SelectedIndex].Selected = true;
            }

    Greetings,
    Hubert
  7. Hubert
    Hubert avatar
    19 posts
    Member since:
    Feb 2012

    Posted 24 Aug 2012 Link to this post

    Hi,

    with JavaScipt you can avoid this problem, even with Ajax running.

    function selectTab(text)
    {
     var tabStrip = $find("<%= RadTabStrip1.ClientID %>");
     var tab = tabStrip.findTabByText(text);
     if (tab)
     {
       tab.select();
     }
    }

    The tab and the multiview are set correctly.

    Greetings,
    Hubert
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017