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

Rad menu Scroll

7 Answers 208 Views
Menu
This is a migrated thread and some comments may be shown as answers.
josephjijo
Top achievements
Rank 1
josephjijo asked on 14 Jul 2010, 02:14 PM
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();

7 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 15 Jul 2010, 09:36 AM
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
0
josephjijo
Top achievements
Rank 1
answered on 15 Jul 2010, 12:52 PM
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
0
Yana
Telerik team
answered on 20 Jul 2010, 02:42 PM
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
0
josephjijo
Top achievements
Rank 1
answered on 21 Jul 2010, 03:07 PM
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
0
Yana
Telerik team
answered on 26 Jul 2010, 01:15 PM
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
0
josephjijo
Top achievements
Rank 1
answered on 14 Aug 2010, 04:19 PM
This solves the height problem.
But the color of the menu left vanishes.

Please find the attached file.
0
Yana
Telerik team
answered on 18 Aug 2010, 01:38 PM
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
Tags
Menu
Asked by
josephjijo
Top achievements
Rank 1
Answers by
Yana
Telerik team
josephjijo
Top achievements
Rank 1
Share this question
or