We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Menus bound to objects

Trying to build a simple menu. I bind the menu to an object and use the menu like this.

@{Html.Syncfusion().Menu("MyMenu")
.Mode(MenuModel.ModeType.NormalMenu)
.DataSource((System.Collections.IEnumerable)ViewData["MenuData"])
.BindTo(fields => fields
.Id("ID")
.ParentId("ParentID")
.Text("MenuText")
).Render();

Menu appears fine but how do I set the menu items to actually navigate to a different page? Is there another field to bind to that does this?



3 Replies

ME Meena Syncfusion Team October 31, 2011 11:35 AM UTC

Hi Doug,

Thanks for using Syncfusion products.

Your requirement of setting the menu items to navigate to different pages could actually be resolved by binding the “LinkAttributes” field as mentioned in the below code snippet.

[View]

<%= Html.Syncfusion().Menu("MyMenu")
.Mode(MenuModel.ModeType.NormalMenu)
.DataSource((System.Collections.IEnumerable)ViewData["MenuData"])
.BindTo(fields => fields
.LinkAttributes("LinkAttributes")
.Id("ID")
.ParentId("ParentID")
.Text("MenuText")) %>



But it has some known issue and we are working on it. We will be providing you the patch update on 11th November,2011.

We suggest you to have follow-up with the Incident-86705 for further updates.

We appreciate your patience in advance.

Regards,
Meena





DS Doug Summersgill October 31, 2011 04:41 PM UTC

How about an example that shows the format that the "LinkAttributes" bound field should be?



ME Meena Syncfusion Team November 1, 2011 04:14 AM UTC

Hi Doug,

Thanks for the update.

We have created a simple sample on Menu with LinkAttributes field and the same can be downloaded from the attachment.

It has some known issue in navigating the menu items to different pages and we are working on it.

We will be providing the patch update on 11th November,2011 and it will be delivered on the Incident-86705.

Thanks for your patience.

Regards,
Meena



MenuForum_55b9b166.zip

Loader.
Live Chat Icon For mobile
Up arrow icon