ReorderTabsOnSelect not working

5 posts, 1 answers
  1. Andy Green
    Andy Green avatar
    342 posts
    Member since:
    Aug 2008

    Posted 09 Apr 2009 Link to this post

    Hi all

    What would cause the  ReorderTabsOnSelect="True" not to work? It did not work on the 2008 Q2, but I got around it with the TabStrip CSS files. These have gone to pieces now with the 2009 Q1 version, but I would be OK with the reorderonselect.

    My guess would be its a postback / reload issue but has anyone had a simiar problem.

    My Fill routine:

     

    Private Sub FillTabs()

     

    Dim Expert As New clsExpert

     

    Dim TabDat As Data.DataTable = Expert.GetAssessmentScales()

     

    With RadTabStrip

    .DataFieldID =

    "AssessmentScale_ID"

     

     

     

    .DataFieldParentID =

    "AssessmentScaleParent_ID"

     

     

    .DataTextField =

    "AssessmentScale_Title"

     

     

    .DataValueField =

    "AssessmentScale_ID"

     

     

    .DataSource = TabDat
    .DataBind()

    .ReorderTabsOnSelect =

    "true"

     

    End With

     

    End Sub

     


    My Mark up
    <telerik:RadTabStrip

     

     

    ID="RadTabStrip"

     

     

    runat="server"

     

     

    EnableEmbeddedSkins="true"

     

     

    Skin="Outlook"

     

     

    SelectedIndex="0"

     

     

    ReorderTabsOnSelect="True"

     

     

    PerTabScrolling="True">

     

    </telerik:RadTabStrip>

     


    Andy

  2. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 09 Apr 2009 Link to this post

    Hi Andy,

    In order to reorder tabs on select you will have to have multirow tabstrip structure. This is accomplished by setting IsBreak="true" to particular tab in your tabstrip. Please refer to our Multi-row example for details on the matter.

    Best wishes,
    Paul
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Andy Green
    Andy Green avatar
    342 posts
    Member since:
    Aug 2008

    Posted 09 Apr 2009 Link to this post

    Thanks - As my tabs move to multiple rows on browser window resize I assumed that it was automatice.

    Any clues on how to set the IsBreak="true"  on a tab that comes from a data base at runtime.

    Andy
  5. Answer
    Paul
    Admin
    Paul avatar
    4281 posts

    Posted 09 Apr 2009 Link to this post

    Hello Andy,

    Please find below a sample code snippet that shows the needed approach.

    ASPX:
    <form id="form1" runat="server">  
    <asp:ScriptManager ID="ScriptManager1" runat="server">  
    </asp:ScriptManager> 
    <telerik:RadTabStrip ID="RadTabStrip" runat="server" Skin="Outlook" SelectedIndex="0" 
    DataFieldID="MenuId" DataSourceID="SqlDataSource1" DataTextField="Text" OnTabDataBound="RadTabStrip_TabDataBound" 
    ReorderTabsOnSelect="true" Align="Justify">  
    </telerik:RadTabStrip> 
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:testConnectionString %>" 
    SelectCommand="SELECT [MenuId], [Text] FROM [panel]"></asp:SqlDataSource> 
    </form> 

    Code-behind:
    using System;  
    using System.Collections.Generic;  
    using System.Linq;  
    using System.Web;  
    using System.Web.UI;  
    using System.Web.UI.WebControls;  
    using Telerik.Web.UI;  
     
    public partial class _Default : System.Web.UI.Page  
    {  
        protected void Page_Load(object sender, EventArgs e)  
        {  
                     
        }  
        protected void RadTabStrip_TabDataBound(object sender, RadTabStripEventArgs e)  
        {  
            if ((e.Tab.Index + 1) % 3 == 0)  
            {  
                e.Tab.IsBreak = true;  
            }  
        }  
    }  
     


    Kind regards,
    Paul
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
  6. Andy Green
    Andy Green avatar
    342 posts
    Member since:
    Aug 2008

    Posted 09 Apr 2009 Link to this post

    Excellent - worked first time, no on with the styling tweaks.
    Andy
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017