Kendo UI TreeView Wrapper

1 posts, 0 answers
  1. Sam
    Sam avatar
    22 posts
    Member since:
    May 2012

    Posted 02 Oct 2012 Link to this post

    good morning everyone,

    i am currently using a licensed version of Kendo UI Complete for ASP.NET MVC (Q2 2012)  and trying to render the checkboxes for the TreeView.  I am using the TreeView wrapper for MVC.  I am looking at the example on the demos kendo UI site and something doesn't look right in the example.

    the demo site is at:  http://demos.kendoui.com/web/treeview/checkboxes.html

    Does the Kendo UI TreeView Wrapper, have a method called "Checkboxes"???  because this would really help my situation right now.  The version of my Kendo UI Wrapper, doesn't seem to have the "Checkboxes" method.  I am trying to achieve the same checkbox functionality like how it is on the demo site:  http://demos.kendoui.com/web/treeview/checkboxes.html

    I have attached a screenshot of what i saw on the demo site and below is the sample demo code out there for the public to look at, as reference.  

    @(Html.Kendo().TreeView()
                    .Name("treeview")
                    .Checkboxes(checkboxes => checkboxes
                        .CheckChildren(true)
                    )
                    .Items(treeview =>
                    {
                        treeview.Add().Text("Furniture").Id("1")
                            .Expanded(true)
                            .Items(furniture =>
                            {
                                furniture.Add().Text("Tables & Chairs").Id("2");
                                furniture.Add().Text("Sofas").Id("3");
                                furniture.Add().Text("Occasional Furniture").Id("4");
                            });
     
                        treeview.Add().Text("Decor").Id("5")
                            .Expanded(true)
                            .Items(furniture =>
                            {
                                furniture.Add().Text("Bed Linen").Id("6");
                                furniture.Add().Text("Curtains & Blinds").Id("7");
                                furniture.Add().Text("Carpets").Id("8");
                            });
                    })
                )

    When I tried to use the above code with my version of the Kendo UI Treeview wrapper, i get an error with the "Checkboxes" method.

    @(Html.Kendo().TreeView()
                        .Name("Blah")
                        .Checkboxes( checkbox =>
                        {
                        })
                        .DataSource( dataSource =>
                        {
                        })
                    )


    Also, it seems that the datasource for checkboxes.cshtml and checkboxes.html examples on the demo site, are different.

    Thank you very much
Back to Top