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

KendoUI + Angular js

4 Answers 73 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Drammy
Top achievements
Rank 1
Drammy asked on 12 Feb 2014, 09:10 AM
Hi,

I'm using Angular js to build a single page app with controllers pulling data from remote services.  On retrieval of the data I am trying to bind a treeview's dataSource to the retrieved data but am not having any joy.

I can build a Kendo treeview and populate it with static data but when I use an Angular controller to populate the data nothing happens; it's as if it's too late?

Has anyone done anything similar or does anyone know how to do it?

4 Answers, 1 is accepted

Sort by
0
Mihai
Telerik team
answered on 12 Feb 2014, 04:19 PM
Hi Martyn,

Can you please show me your code?  I'm afraid I won't be able to help without seeing how it creates the tree view and populates the datasource.  Just extract some minimal test code if possible.

Regards,
Mihai
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Drammy
Top achievements
Rank 1
answered on 12 Feb 2014, 11:58 PM
Thanks Mihai,

I've actually sacked off Kendo UI for this task - I just couldn't get it to work.  I went with something else instead; basically a ng-repeat loop.

If you get 5 mins I'd appreciate understanding how it should be done...?
0
Mihai
Telerik team
answered on 13 Feb 2014, 09:08 AM
Hi Martyn,

Here is an example: http://plnkr.co/edit/IP8QPeYnW27Fwq1u0ot3?p=preview

It creates a tree, and provides some buttons that load data dynamically from some JSON files.  Note that populating the tree is as simple as changing the data source variable in the $scope.

Hope it helps.

Regards,
Mihai
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Drammy
Top achievements
Rank 1
answered on 18 Feb 2014, 01:29 PM
Thanks Mihai,

I'm not sure what I was doing wrong but I will look to swap this back in now as I do prefer the Kendo UI controls.

Thanks!
Tags
TreeView
Asked by
Drammy
Top achievements
Rank 1
Answers by
Mihai
Telerik team
Drammy
Top achievements
Rank 1
Share this question
or