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

Sub Menu Width to match Root Item

3 Answers 100 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Trevor
Top achievements
Rank 2
Trevor asked on 03 Nov 2010, 12:06 PM
I hope someone could please help me in the right direction. I have been trying to set the sub menu width to be 100% the width of the Root Item, It's currently looking a bit odd that the sub menu often ends up being quite a bit shorter than the width of the root item. Is this possible in the way the menu is structured or would it involve implementing some Java scripting?

3 Answers, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 10 Nov 2010, 10:33 AM
Hello Trevor,

The easiest way to adjust the width of the RadMenu child items is to use the GroupSettings property:
<telerik:RadMenu ID="RadMenu1" Skin="Black" runat="server">
    <Items>
        <telerik:RadMenuItem Text="Veeeery looong item text">
            <GroupSettings Width="155px" />
            <Items>
                <telerik:RadMenuItem runat="server" Text="Item 1" />
                <telerik:RadMenuItem runat="server" Text="Item 2" />
                <telerik:RadMenuItem runat="server" Text="Item 3" />
            </Items>
        </telerik:RadMenuItem>
    </Items>
</telerik:RadMenu>


All the best,
Kalina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Trevor
Top achievements
Rank 2
answered on 17 Nov 2010, 04:15 PM
Hi Kalina,

Thank you for your reply. I'm using a sitemap to generate the Menu, is there no way to set GroupSettings width in CSS to something like 100% of parent item?
0
Kalina
Telerik team
answered on 23 Nov 2010, 03:08 PM
Hello Trevor,

I am afraid that setting the submenu width in the manner that you describe is not achievable.
Could you please explain in more details what the exact behaviour that you want to implement is?
What would happen if the text of the submenu items is longer than the width of the root item?
Is it possible to use the root item width as minimum width for the submenu and to let the submenu increase its width upon the width of the text of its items?

Regards,
Kalina
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Menu
Asked by
Trevor
Top achievements
Rank 2
Answers by
Kalina
Telerik team
Trevor
Top achievements
Rank 2
Share this question
or