This is a migrated thread and some comments may be shown as answers.

How to disable tab select?

2 Answers 160 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Pauli
Top achievements
Rank 1
Pauli asked on 27 Jan 2009, 05:26 AM
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 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 27 Jan 2009, 01:03 PM
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

0
Pauli
Top achievements
Rank 1
answered on 29 Jan 2009, 04:37 AM
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


Tags
TabStrip
Asked by
Pauli
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Pauli
Top achievements
Rank 1
Share this question
or