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

[Solved] FirstLook TreeView

0 Answers 24 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Maki
Top achievements
Rank 1
Maki asked on 07 Sep 2011, 07:14 PM
Hello !

I installed telerik extensions for ASP.Net MVC
I created a ASP.NET MVC 3 web app . Then I made a treeview so now I have:

Controller:

    public ActionResult FirstLook()
        {
            return View();
        }

View:

@model TelerikMvc.Models.Products

@{
    ViewBag.Title = "Products";
}

<h2>Ofer today</h2>
@(Html.Telerik().TreeView()
           .Name("myTreeView")
            
        .Items(item =>
        {   item.Add()
                .Text("Products")
                .ImageUrl("~/Content/PanelBar/FirstLook/foldersList.gif")
                .ImageHtmlAttributes(new { alt = "Folders List Icon" })
                .Items((subItem) =>
                {
                    subItem.Add()
                            .Text("Meat")
                            .ImageUrl("~/Content/PanelBar/FirstLook/1.png")
                            .ImageHtmlAttributes(new { alt = "Folder List Icon" });
                            
                                          
                    subItem.Add()
                            .Text("Milk products")
                            .ImageUrl("~/Content/PanelBar/FirstLook/1.png")
                            .ImageHtmlAttributes(new { alt = "Folder List Icon" });
                   
                });
        })
)

I also have models: Product.edmx

When I start debugging I see my tree view.

My question is:

When I click on the milk products on the tree view, how can I display data of the milk product contained within Product.edmx ?

I need a specific solution because I have reviewed the telerik video tutorials and questions on the forum 
but I couldnt  solve my problem.


Thanks in advance!
Tags
TreeView
Asked by
Maki
Top achievements
Rank 1
Share this question
or