This is a migrated thread and some comments may be shown as answers.
Best of Datasource and BindTo?
1 Answer 64 Views
This is a migrated thread and some comments may be shown as answers.
Caleb Sandfort
Top achievements
Rank 1
Caleb Sandfort asked on 05 Jun 2014, 12:50 AM
Hi

I am attempted to work with a treeview and it is not going very well.  I am using Datasource property to get the nodes of the treeview which works.  I want to be able to set the ImageUrl of the nodes.  This is something that I have been able to do in the past using BindTo and mapping the appropriate fields.

Is there some way to use the Datasource and set up a property mapping?  Unless I'm missing something, it seems like you are pretty limited with what you can do as far as setting any node properties other than the text using the Datasource.

Any help would be appreciated.

1 Answer, 1 is accepted

Sort by
0
Accepted
Alex Gyoshev
Telerik team
answered on 05 Jun 2014, 08:27 AM
Hello Caleb,

You can project your data via an anonymous type on the server -- so that the TreeView picks up the imageUrl field. An example of this can be seen in the remote data binding example in the demos (see the controller source).

Regards,
Alex Gyoshev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Asked by
Caleb Sandfort
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Share this question
or