This question is locked. New answers and comments are not allowed.
Hi All,
I am interested in buying Telerik, and I have some doubts working with Menus. I have a table with the opcion to create a Menu, some rows are primay opcion and other are subopcion. The code I'm using to create the menu is as followed, but instead of create the menu with subitem, just create opcion. Any ideas about what I'm doing wrong ??.
Also working with MVC 3 can I use Htm.RenderAction() in the Site.Master page????
Thanking any help....
Maria
I am interested in buying Telerik, and I have some doubts working with Menus. I have a table with the opcion to create a Menu, some rows are primay opcion and other are subopcion. The code I'm using to create the menu is as followed, but instead of create the menu with subitem, just create opcion. Any ideas about what I'm doing wrong ??.
Also working with MVC 3 can I use Htm.RenderAction() in the Site.Master page????
Thanking any help....
Maria
<% if (Model != null) Html.Telerik().Menu() .Name("Menu") .Items(items => { var nivel0 = Model.Where(n => n.Nivel == 0).ToList<ModeloDatos.PruebaMenu>(); for (int i = 0; i < nivel0.Count; i++) { // guardo el valor del padre int IdPadre = nivel0[i].MenuId; string texto = nivel0[i].Texto; // aƱado el item items.Add() .Text(nivel0[i].Texto) .Items(subitem => { var nivel1 = Model.Where(s => s.PadreId == IdPadre).ToList<ModeloDatos.PruebaMenu>(); for (int j = 0; j < nivel1.Count(); j++) { items.Add() .Text(nivel1[j].Texto); } }); } }) .Render(); %>