Sub Menu Width to match Root Item

4 posts, 0 answers
  1. Trevor
    Trevor avatar
    2 posts
    Member since:
    Sep 2010

    Posted 03 Nov 2010 Link to this post

    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?
  2. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 10 Nov 2010 Link to this post

    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
  3. Trevor
    Trevor avatar
    2 posts
    Member since:
    Sep 2010

    Posted 17 Nov 2010 Link to this post

    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?
  4. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 23 Nov 2010 Link to this post

    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.
Back to Top