Select issue

8 posts, 0 answers
  1. Eva
    Eva avatar
    50 posts
    Member since:
    Jun 2010

    Posted 27 Oct 2011 Link to this post

    I have a simple radstrip, every time i click Reports tab, Provider tabe is enabled.

     


    <
    telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Windows7" MultiPageID="RadMultiPage1"

     

     

     

    SelectedIndex="0" Align="Justify" Width="347px">

     

     

     

    <Tabs>

     

     

     

    <telerik:RadTab Text="Providers" NavigateUrl="Default.aspx" runat="server" >

     

     

     

    </telerik:RadTab>

     

     

     

    <telerik:RadTab Text="Reports" NavigateUrl="~/Report/Reports.aspx" runat="server">

     

     

     

    </telerik:RadTab>

     

     

     

    </Tabs>

     

     

     

    </telerik:RadTabStrip>

    Need help ASAP.

     

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

    Posted 28 Oct 2011 Link to this post

    Hello Eva,

    You can try  the following code snippet in TabClick event to disable the second tab.

    C#:
    protected void RadTabStrip2_TabClick(object sender, Telerik.Web.UI.RadTabStripEventArgs e)
    {
     RadTabStrip2.Tabs[1].Enabled = false;
    }

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Eva
    Eva avatar
    50 posts
    Member since:
    Jun 2010

    Posted 28 Oct 2011 Link to this post

    Could you please provide a code from client side. This control is in master page.
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 29 Oct 2011 Link to this post

    Hello Eva,

    You can try the following javascript in the client event OnClientTabSelected.
    Javascript:
    function OnClientTabSelected(sender,args)
    {
      args.get_tab().get_nextTab().set_enabled(false);
    }

    Thanks,
    Shinu.
  6. Eva
    Eva avatar
    50 posts
    Member since:
    Jun 2010

    Posted 31 Oct 2011 Link to this post

    Hi Shinu,

    Here is my code

    <

     

     

    script type="text/javascript">

     

     

     

    function OnClientTabSelected(sender, args) {

     

    args.get_tab().get_nextTab().set_enabled(

     

    false);

     

    }

     

     

    </script>

     


    <

     

     

    telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Windows7" OnClientTabSelected="OnClientTabSelected"

     

     

     

    Align="Justify" ReorderTabsOnSelect="True" Width="347px" SelectedIndex="0" >

     

     

     

    <Tabs>

     

     

     

    <telerik:RadTab Text="Providers" NavigateUrl="Default.aspx" runat="server">

     

     

     

    </telerik:RadTab>

     

     

     

    <telerik:RadTab Text="Reports" NavigateUrl="Report/Reports.aspx"

     

     

     

    runat="server">

     

     

     

    </telerik:RadTab>

     

     

     

    </Tabs>

     

     

     

    </telerik:RadTabStrip>

     

    I'm getting the following javascript error
    'get_tab().get_nextTab()' is null or not an object
  7. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 03 Nov 2011 Link to this post

    Hello Eva,

    Please try the following implementation of the event handler function:
    function OnClientTabSelected(sender, args) {
     
                if(args.get_tab().get_nextSibling() != null ){
     
                    args.get_tab().get_nextSibling().set_enabled(false);
                }
                else{
     
                    args.get_tab().get_previousSibling().set_enabled(false);
                }
            }

    Greetings,
    Dimitar Terziev
    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
  8. Eva
    Eva avatar
    50 posts
    Member since:
    Jun 2010

    Posted 03 Nov 2011 Link to this post

    Hi Dimitar,

    It's still not working.

    Here is my code

    <%

     

    @ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.Master.cs" Inherits="WebUI._site" %>

     

    <%

     

    @ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

     

    <!

     

     

    DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

     

    <

     

     

    html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

     

    <

     

     

    head id="Head1" runat="server">

     

     

     

    <title></title>

     

     

     

    <link href="Styles/Site.css" rel="stylesheet" type="text/css" />

     

     

     

    <script type="text/javascript">

     

     

     

     

    function OnClientTabSelected(sender, args) {

     

     

     

     

    if (args.get_tab().get_nextSibling() != null) {

     

    args.get_tab().get_nextSibling().set_enabled(

     

    false);

     

    }

     

     

    else {

     

    args.get_tab().get_previousSibling().set_enabled(

     

    false);

     

    }

    }

     

     

    </script>

     

    </

     

     

    head>

     

    <

     

     

    body>

     

     

     

    <form id="Form1" runat="server" >

     

     

     

    <asp:ContentPlaceHolder ID="HeadContent" runat="server">

     

     

     

    </asp:ContentPlaceHolder>

     

     

     

     

     

    <div class="page">

     

     

     

    <div class="header" style="left: 0px; top: 0px">

     

     

     

    <div class="title">

     

     

     

    <h1>

     

    Suspended & Ineligible Providers

     

     

    </h1>

     

     

     

    </div>

     

     

     

    <div class="loginDisplay">

     

     

     

    <asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">

     

    <%

     

    -- <AnonymousTemplate>

     

    [ <a href="~/Account/Login.aspx" id="HeadLoginStatus" runat="server">Log In</a> ]

    </AnonymousTemplate> --

     

     

    %>

     

     

     

    <LoggedInTemplate>

     

    Welcome

     

    <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>

     

    <%

     

    -- ! [ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/"/> ] --%>

     

     

     

    </LoggedInTemplate>

     

     

     

    </asp:LoginView>

     

     

     

    </div>

     

     

     

    <div class="clear hideSkiplink">

     

     

     

     

    <telerik:RadScriptManager ID="ScriptManager" runat="server" />

     

     

     

     

     

     

    <telerik:RadTabStrip ID="RadTabStrip1" runat="server" Skin="Windows7" OnClientTabSelected="OnClientTabSelected"

     

     

     

    Align="Justify" ReorderTabsOnSelect="True" Width="347px" SelectedIndex="0" >

     

     

     

    <Tabs>

     

     

     

    <telerik:RadTab Text="Providers" NavigateUrl="Default.aspx" runat="server">

     

     

     

    </telerik:RadTab>

     

     

     

    <telerik:RadTab Text="Reports" NavigateUrl="Report/Reports.aspx"

     

     

     

    runat="server">

     

     

     

    </telerik:RadTab>

     

     

     

    </Tabs>

     

     

     

    </telerik:RadTabStrip>

     

     

     

     

    </div>

     

     

     

    </div>

     

     

     

    <div class="main">

     

     

     

    <asp:ContentPlaceHolder ID="MainContent" runat="server">

     

     

     

    <asp:Button runat="server" ID="btntest" />

     

     

     

    </asp:ContentPlaceHolder>

     

     

     

    </div>

     

     

     

    <div class="clear">

     

     

     

    </div>

     

     

     

    </div>

     

     

     

    <div class="footer">

     

     

     

     

    </div>

     

     

     

     

    </form>

     

    </

     

     

    body>

     

    </

     

     

    html>

     

    using

     

     

    System;

     

     

     

     

    using

     

     

    System.Data;

     

     

     

     

    using

     

     

    System.Configuration;

     

     

     

     

    using

     

     

    System.Collections;

     

     

     

     

    using

     

     

    System.Web;

     

     

     

     

    using

     

     

    System.Web.Security;

     

     

     

     

    using

     

     

    System.Web.UI;

     

     

     

     

    using

     

     

    System.Web.UI.WebControls;

     

     

     

     

    using

     

     

    System.Web.UI.WebControls.WebParts;

     

     

     

     

    using

     

     

    System.Web.UI.HtmlControls;

     

     

     

     

    using

     

     

    Telerik.Web.UI;

     

     

     

     

    namespace

     

     

    WebUI

     

    {

     

     

    public partial class _site : System.Web.UI.MasterPage

     

     

     

     

     

    {

     

     

    protected void Page_Load(object sender, EventArgs e)

     

    {

     

    }

    }

    }


    What i'm missing here?

  9. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 09 Nov 2011 Link to this post

    Hello Eva,

    I've prepared a sample page trying to reproduce the problem describe in your first post, but to no avail. Please find attached the sample page and test whether the corresponding pages are loaded when a tab is clicked.

    Kind regards,
    Dimitar Terziev
    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017