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

[Solved] Question about Parent-Children Menu options..

0 Answers 46 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Maria
Top achievements
Rank 1
Maria asked on 07 Dec 2010, 12:38 PM
Hi All!!!
I have two tables,  "MenuPadre" that contain menu options and "MenuHijo" containing sub-options. These two tables are related. 
The problem I have is that in the menu are the opcion from "MenuPadre", but not appear the chidren suboptions. Any idea about that i'm doing wrong ????.

This is the code for the view
Thanks...

Maria

<% Html.Telerik().Menu()
        .Name("Menu Dos")
        .BindTo(Model, mappings =>
            {
                mappings.For<ModeloDatos.MenuPadre>(binding => binding
                    .ItemDataBound((item, menupadre) =>
                        {
                            item.Text = menupadre.Texto;
                         })
                        .Children(menupadre => menupadre.MenuHijo));
                mappings.For<ModeloDatos.MenuHijo>(binding => binding
                    .ItemDataBound((item, menuhijo) =>
                        {
                            item.Text = menuhijo.Texto;
                         }));
  
            })
            .Render(); 
%>
Tags
General Discussions
Asked by
Maria
Top achievements
Rank 1
Share this question
or