[RadTabStrip] Tooltip does not work

5 posts, 0 answers
  1. Snoopy
    Snoopy avatar
    5 posts
    Member since:
    Jul 2012

    Posted 10 Jul 2012 Link to this post

    Hello,

    I use the component RadTabStrip. It is impossible to change the tooltip of a RadTab. It automatically changes the Text property. The value of the property Tooltip does not work.

    cordially
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 10 Jul 2012 Link to this post

    Hello,

    Here is the sample code that I tried to change the tooltip of RadTabStrip on tabclick event.

    ASPX:
    <telerik:RadTabStrip ID="RadTabStrip1" runat="server"  ToolTip="FirstToolTip"  ontabclick="RadTabStrip1_TabClick" >
        <Tabs>
           <telerik:RadTab Text="RadTab1" >
           </telerik:RadTab>
           <telerik:RadTab Text="RadTab2"  >
           </telerik:RadTab>
           <telerik:RadTab Text="RadTab3" >
           </telerik:RadTab>
        </Tabs>
    </telerik:RadTabStrip>

    C#:
    protected void RadTabStrip1_TabClick(object sender, RadTabStripEventArgs e)
        {
                RadTabStrip1.ToolTip = "ChangedToolTip";
        }

    Please provide your code if it doesn't helps.

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Snoopy
    Snoopy avatar
    5 posts
    Member since:
    Jul 2012

    Posted 10 Jul 2012 Link to this post

    Hello,

    No this is not the tooltip of the RadTabStrip but RadTab

    <telerik:RadTabStrip ID="OngletsSociete" runat="server" ClickSelectedTab="true" AutoPostBack="true"
        CssClass="RadTabstrip_Sidetrade" MultiPageID="RadMultiPage1" Style="border-bottom: solid 1px #fb4f14"
        EnableEmbeddedSkins="False" EnableEmbeddedBaseStylesheet="False" OnTabClick="TabClick">
        <Tabs>
            <telerik:RadTab runat="server" CssClass="Onglet OngletFirst" Value="Performance" Text="<%$ Resources:STN,ONG_PERFORMANCE%>"
                PageViewID="Performance" Selected="True" SelectedCssClass="OngletSelectionner" />
            <telerik:RadTab runat="server" CssClass="Onglet" Value="RisqueInterne" Text="<%$ Resources:STN,ONG_RISQUE_INTERNE%>"
                PageViewID="RisqueInterne" SelectedCssClass="OngletSelectionner" ToolTip=" "/>
            <telerik:RadTab runat="server" CssClass="Onglet" Value="Solvabilite" Text="<%$ Resources:STN,ONG_SOLVABILITE_GARANTIE%>"
                PageViewID="Solvabilite" SelectedCssClass="OngletSelectionner" ToolTip=" "/>
            <telerik:RadTab runat="server" CssClass="Onglet" Value="Recouvrement" Text="<%$ Resources:STN,ONG_RECOUVREMENT_LITIGES%>"
                PageViewID="Recouvrement" SelectedCssClass="OngletSelectionner" ToolTip=" "/>
            <telerik:RadTab runat="server" CssClass="Onglet" Value="Cash" Text="<%$ Resources:STN,ONG_CASH%>"
                PageViewID="Cash" SelectedCssClass="OngletSelectionner" ToolTip="Cash "/>
            <telerik:RadTab runat="server" OuterCssClass="OngletSideNoteAlerte" CssClass="Onglet OngletImage"
                Value="SideNote"  PageViewID="SideNote"
                SelectedCssClass="OngletSelectionner" ToolTip="Toutes les SideNote non lues "/>
            <telerik:RadTab runat="server" OuterCssClass="OngletSideNoteAlerte" CssClass="Onglet OngletImage OngletFirstRight"
                Value="Alerte" PageViewID="Alerte" SelectedCssClass="OngletSelectionner" ToolTip="Toutes les alertes"/>
        </Tabs>
    </telerik:RadTabStrip>

    It does not take into account

    cordially
  5. Ivan Zhekov
    Admin
    Ivan Zhekov avatar
    539 posts

    Posted 10 Jul 2012 Link to this post

    Hello, Cordially.

    There is not direct client API that you can use, but you could use the following snippet:

    // cache jQuery
    var $ = $telerik.$;
     
    // Modify the ID to match your tab
    var tab = $find("tabstrip")
        // gets the tab collection
        .get_tabs()
        // gets the 0 tab
        .getItem(0)
        // gets the element (li)
        ._element;
         
    // wrap the tab with jQ
    $(tab)
        // query for A elements
        .children("a")
        // gets the first and only
        .get(0)
        // set the title
        .title = "Title"

    You could do the same from the code behind using a much easier and shorter snippet:

    tabstrip.Tabs[0].ToolTip = "ToolTip";

    Using the server API you could even Query tabs based on values, not only indices and much more.

    Greetings,
    Ivan Zhekov
    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. Snoopy
    Snoopy avatar
    5 posts
    Member since:
    Jul 2012

    Posted 10 Jul 2012 Link to this post

    Hello,


    I had used all the means (except javascript) but he put the tab text in the tooltip. I remade the tests see your answers and I see that it works. Sorry, I do not know what it is spent.


    cordially
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017