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

[Solved] Telerik - RadMenu binding

5 Answers 118 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nancy Mary
Top achievements
Rank 1
Nancy Mary asked on 18 Nov 2009, 03:02 AM
Hi am new to telrik controls. This is my first attempt with it.

In my form :
<telerik:RadMenu ID="RadMenu1" runat="server" Width="45px" Height="18px" >
<Items>
    <telerik:RadMenuItem runat="server"></telerik:RadMenuItem>        
</Items>
</telerik:RadMenu>

I have the code like above and in my code behind:
RadMenu1.Controls.Add(new LiteralControl(Header));
foreach (Test abc in ABC)
{
  LinkButton linkButton = new LinkButton();
  linkButton.Click += new EventHandler(OnSCrollingMenuItemSelected);
  linkButton.Text = sometext;
  linkButton.CommandArgument = SomeID;
  RadMenu1.Controls.Add(new LiteralControl("<li>"));    
  RadMenu1.Controls.Add(somelink);
  RadMenu1.Controls.Add(new LiteralControl("</li>"));
}
RadMenu1.Controls.Add(new LiteralControl("</ul></li>"));

How I want the out put to look like is this :
http://demos.telerik.com/aspnet-ajax/menu/examples/functionality/scrolling/defaultcs.aspx

But my code does not seems to bind the value to RadmenuItem instead the value gets binded to RadMenu. I know am binding values to RadMenu. But I dont know how to do that to RadMenuItem.

Please Help.

Thanks.

5 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 19 Nov 2009, 01:13 PM
Hello Nancy,

You just need to set EnableRootItemScroll property of RadMenu to true and also its width and the scrollbar arrows will appear when the overall items width exceeds its predefined width.

Sincerely yours,
Yana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Nancy Mary
Top achievements
Rank 1
answered on 20 Nov 2009, 07:57 AM
Thanks for the reply. I got it working and my rad menu works as expected.

Now am trying to change the skin to my own. Coz the skins provided are not how I wanted my menu to look. So I tried the steps provided in this link http://www.telerik.com/help/aspnet-ajax/menu_appearancecreatingacustomskin.html

But this does not seem to work. My rad menu looks all ugly with a font size and color of its own, scolling is not available. I did everything that is there in the above link.

Is there something missing from the link. Please help.

Thanks.
0
Nancy Mary
Top achievements
Rank 1
answered on 20 Nov 2009, 08:54 AM
And just so you know am just using the dll in the project. And the file version is 2009.01.0527.20
0
Nancy Mary
Top achievements
Rank 1
answered on 20 Nov 2009, 10:54 AM
Never mind. I got it working
0
Joan Vilariño
Top achievements
Rank 2
answered on 27 Sep 2010, 02:39 PM
Hello... is there any way currently to get the same behavior with MVC Menu extension? I have large submenus and they go way down my screen... it would be much better to allow the submenus scroll with all their items...

Thanks!
Tags
Menu
Asked by
Nancy Mary
Top achievements
Rank 1
Answers by
Yana
Telerik team
Nancy Mary
Top achievements
Rank 1
Joan Vilariño
Top achievements
Rank 2
Share this question
or