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

get attributes collection

1 Answer 63 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Quim
Top achievements
Rank 1
Quim asked on 21 Jul 2015, 10:12 AM

Hello

Is there any way to access custom attributes collection as an array from client side, so that we can loop through all the attributes?

Thanks

1 Answer, 1 is accepted

Sort by
0
Aneliya Petkova
Telerik team
answered on 22 Jul 2015, 07:52 AM
Hi Quim,

Attributes can be accessed in client-side code using getAttributes() function of a RadTreeNode. More information you may find in our documentation and in the following online demo:
http://demos.telerik.com/aspnet-ajax/treeview/examples/applicationscenarios/customattributes/defaultcs.aspx
http://docs.telerik.com/devtools/aspnet-ajax/controls/treeview/custom-attributes/using-custom-attributes-at-the-client

I made for you an example, showing how you can get all attributes of every RadTreeNode and print the values in a Label. I hope that it will be helpful.

Regards,
Aneliya Petkova
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
TreeView
Asked by
Quim
Top achievements
Rank 1
Answers by
Aneliya Petkova
Telerik team
Share this question
or