How to disable tab select?

3 posts, 0 answers
  1. Pauli
    Pauli avatar
    5 posts
    Member since:
    Mar 2008

    Posted 26 Jan 2009 Link to this post

    Hi !

    I have a tab strip and the tabs open in a frame.
    I do not want the tab (which I clicked) to change color/state.

    Is there some other way to do this, apart from changing the CSS selected to something like the normal CSS?
    Something like some property to disable or a javascript to reset the tab strip (no tabs have been clicked)?

    Hope that you have understood my query and that you can help me out.

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

    Posted 27 Jan 2009 Link to this post

    Hi Yashvin,

    Give a try with following code snippet to disable the tab selection and see if it helps.

    ASPX:
    <telerik:RadTabStrip ID="RadTabStrip1"  MultiPageID="RadMultiPage1" OnClientTabSelecting="TabSelecting"  runat="server"
            .... 

    JS:
    <script type="text/javascript" > 
        
       function TabSelecting(sender, eventArgs) 
       { 
         eventArgs.set_cancel(true); 
       } 
    </script> 


    Thanks
    Princy

  3. Pauli
    Pauli avatar
    5 posts
    Member since:
    Mar 2008

    Posted 28 Jan 2009 Link to this post

    Hi!

    Thanks for ur answer, it had put me on the right track to solve my problem.

    So, here is the modified function:
           function TabSelecting(sender, eventArgs)
           {
                var tab = eventArgs.get_tab();
                var navigateUrl = tab.get_navigateUrl();
                parent.LoadURLOnglet(navigateUrl);
                eventArgs.set_cancel(true);
           }

    The navigateUrl gets the link which is supposed to be loaded when the user clicks a tab.
    I get this link and then, call another function "parent.LoadURLOnglet(navigateUrl);" ( which loads this link separately in another frame - that's how my system works)
    Finally, I cancel the eventArgs.

    This seems the easiest way to hide the "selected" tab effect.
    Another way can be to set the CSS hover tab as the normal link tab.

    Hope I talked sense here, please feel free to share your part.

    Cheers from Mauritius,
    http://www.yashvinblogs.com


Back to Top