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

Grid using TreeView Load Issue

3 Answers 104 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 20 Dec 2012, 04:44 PM
I have a Kendo Grid that uses ClientDetailTemplateId to pull in a Kendo Treeview.  When using the Telerik.Grid to do the same thing the Treeview makes a call to the Controller and all is good.

However I'm not sure I understand enough to make this work.  Basically I have the Kendo Treeview template displaying with the plus sign on the node.  However when I click the Node nothing happens.  I would expect that my Action and Controller to be called.  I know the Telerik tree view made an .Ajax().Select call and I do not see that option in the Datasource.    I used the demo http://demos.kendoui.com/web/treeview/remote-data.html as a model to just try to get this too work and I have set breakpoint on the controller.  Please let me know if you have any suggestions.

 @(Html.Kendo().TreeView()         
            .Name("treeview")                                      
            .DataSource(dataSource => dataSource                         
                         .Read(read => read.Action("ActionTest", "Test"))
         .ToClientTemplate() 

---------Controller
public JsonResult ActionTest()
        {
            var x = new List<KendoTreeViewItemModel>
                {
                    new KendoTreeViewItemModel { id = "1", text = "Surname1", hasChildren=true },
                    new KendoTreeViewItemModel { id = "2", text = "Surname2", hasChildren=true },
                };

            return Json(x, JsonRequestBehavior.AllowGet);
        }

3 Answers, 1 is accepted

Sort by
0
Shawn
Top achievements
Rank 1
answered on 20 Dec 2012, 05:24 PM
Sorry but discovered I had two Actions named the same with different parameters........didnt notice it until I looked at network traffic and discovered the Status error and detail.  So now I'm getting to Controller.

thanks
0
abhishek
Top achievements
Rank 1
answered on 23 Mar 2014, 11:19 PM
Is it possible for you to share how the ui looks like for the problem?
Also if you could show how you call treeview in the treegrid?

-Thanks,
Abhishek
0
Kiril Nikolov
Telerik team
answered on 26 Mar 2014, 07:15 AM
Hi Abhishek,

If you have troubles with the Kendo UI TreeView, I would suggest you to open your own support request with a bit more information regarding what the issue that you are facing is. We will be more than happy to help you!

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TreeView
Asked by
Shawn
Top achievements
Rank 1
Answers by
Shawn
Top achievements
Rank 1
abhishek
Top achievements
Rank 1
Kiril Nikolov
Telerik team
Share this question
or