Rad menu Scroll

8 posts, 0 answers
  1. josephjijo
    josephjijo avatar
    24 posts
    Member since:
    Oct 2006

    Posted 14 Jul 2010 Link to this post

    How to add scroll to rad menu child items dynamically

    <telerik:RadMenu ID="rm_top" runat="server" Style="z-index: 2000" CausesValidation="False"
                                        Font-Names="Arial" Width="100%" OnPreRender="rm_top_PreRender" EnableRoundedCorners="true"
                                        BorderStyle="None" >
                                                                          <CollapseAnimation Type="OutExpo" Duration="200"></CollapseAnimation>
                                    </telerik:RadMenu>
      
      
    binding code:
    rm_top.DataFieldID = "AdminMenuID";
                    rm_top.DataFieldParentID = "AdminMenuParentID";
                    rm_top.DataTextField = "AdminMenuName";
                    rm_top.DataValueField = "AdminMenuID";
                    rm_top.DataNavigateUrlField = "AdminMenuUrl";
                    rm_top.DataBind();
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 15 Jul 2010 Link to this post

    Hello josephjijo,

    You should set height property of the submenu like this:

    rm_top.DefaultGroupSettings.Height = Unit.Pixel(500);

    Kind regards,
    Yana
    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. UI for ASP.NET Ajax is Ready for VS 2017
  4. josephjijo
    josephjijo avatar
    24 posts
    Member since:
    Oct 2006

    Posted 15 Jul 2010 Link to this post

    Hi,
    But if I set the height like that all child menus will get get the same legth and also the skin is lost for child menus.
    I'm using skin = "Sunset".

    I have child menus with different number of rows.
    So how to set the height in this case.


    Regards,

    Jijo
  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 20 Jul 2010 Link to this post

    Hi Jijo,

    You cannot use the scrolling functionality of RadMenu without setting GroupSettings.Height property of the root items as demonstrated here. You can subscribe to ItemDataBound event and set different height to different items.

    Greetings,
    Yana
    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
  6. josephjijo
    josephjijo avatar
    24 posts
    Member since:
    Oct 2006

    Posted 21 Jul 2010 Link to this post

    My menu is binded dynamically.
    So in item databound can i check the items count of the child menu and set the height if the items exceeds 10
  7. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 26 Jul 2010 Link to this post

    Hello Jijo,

    In this case I suggest you use DataBound event instead like this:
    protected void RadMenu1_DataBound(object sender, EventArgs e)
    {
        foreach (RadMenuItem rootItem in RadMenu1.Items)
        {
            if( rootItem.Items.Count > 10)
                rootItem.GroupSettings.Height = Unit.Pixel(250);
        }
    }

    Hope this helps.

    Greetings,
    Yana
    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
  8. josephjijo
    josephjijo avatar
    24 posts
    Member since:
    Oct 2006

    Posted 14 Aug 2010 Link to this post

    This solves the height problem.
    But the color of the menu left vanishes.

    Please find the attached file.
  9. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 18 Aug 2010 Link to this post

    Hello Jijo,

    I tried to reproduce this issue but to no avail. Could you please send us a live url or sample code so we to be able to observe it? Thanks

    Best wishes,
    Yana
    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017