|110666||Aug 20,2013 07:14 AM UTC||Sep 18,2013 01:09 PM UTC||ASP.NET MVC (Classic)||3|
Thanks for contacting Syncfusion support.
Your requirement of “Display the Menu items based on Role” can be achieved by filtering the list based on Role field. We have used Generic Drop Down, based on this DropDown value the Menu items will be displayed in the web page. Please refer the following code snippet.
public ActionResult Index(string myDropDown)
List<GenericListMenu> newlist = new MenuDataContext().GenericListMenu;
List<GenericListMenu> result1 = new List<GenericListMenu>();
if (myDropDown == "Team Leader")
result1 = newlist.Where(c => c.Role == "TL").ToList<GenericListMenu>();
result1 = newlist.Where(c => c.Role == "TM").ToList<GenericListMenu>();
ViewData["MenuData"] = result1;
.BindTo(bind => bind
We have also prepared a simple sample to show case this behavior. It can be downloaded from the below given link
Please let us know if you have further queries.
We regret for the inconvenient caused. We suspect that the error might have occurred due to improper deletion of “ToolsController page”. Please download the modified sample from the link given below,
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
or the page will be automatically redirected to sign-in page in 10 seconds.