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

Using Rad Menu as Tab control (is that even possible)

1 Answer 129 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Aalok
Top achievements
Rank 1
Aalok asked on 26 Mar 2009, 12:00 PM
We are evaluating telerik and checking if telerik:RadMenu can be used as a tab control. We defined the "tab"s as top level horizontal menus and styled them accordingly. Everything seems to work fine but here the problem, we cannot show the currently selected tab. When the user click on the tab (top level menu) we are making an AJAX call and filling the "tab" below the menu according to the tab clicked. At this point the Tab (menu item) remains high lighted. So far so good. But as soon as you click in any edit control or anywhere on the page, the tab (top menu item) looses its high light (looses its rmFocused style), leaving user confused about which "tab" he is in.

My question is "Can RadMenu be used as tab control?". If yes, what style sheet changes I will need to make to keep the last selected menu high lighted. There is no post back happening for the menu in my code so menu is not getting re-initialized, that is why I am thinking this should be doable.

I tried rmExpanded rmClicked etc but no matter what I try I am not able to keep the Tab (top menu) highlighted.

Is there a dedicated tab control from Telerik that we need to use here instead?

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 26 Mar 2009, 12:51 PM
Hi Aalok,

You should set CssClass property of the selected item to "rmFocused" as soon as the user clicks it in order to highlight it:

foreach (RadMenuItem childItem in clickedItem.Menu.GetAllItems())
{
  childItem.CssClass = "";
}
clickedItem.CssClass = "rmFocused";

If you have any difficulties with this, please write to us again.

Greetings,
Yana
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Menu
Asked by
Aalok
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or