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

Custom Attributes Load on Demand problems

1 Answer 59 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Nikolay
Top achievements
Rank 1
Nikolay asked on 17 Mar 2010, 03:14 PM
Hello!

I'm populate my RadTreeView via WCF service on demand. In service I'm set custom attribute to RadTreeNode:
Attributes = new Dictionary<string, object> { { "TypeAttribute", "Type1" } } 
Next time I'm recieve node with this attribute in WCF service (when I'm expand it), Attributes property contains this keypair: "0, {object}" instead {"TypeAttribute", "Type1"}.
When I'm debug my page in fireBug, I noticed then attributes of node in post json (from page to service) contains value of keypair as string, but response from service contains it as object. Maybe this is a source of problem?

My question is - how I must set custom attributes in WCF service code to correctly get it from "node" parameter of LoadData method of service?
Thank you.

P.S. Sorry for my bad English.

1 Answer, 1 is accepted

Sort by
0
Dimitar Milushev
Telerik team
answered on 19 Mar 2010, 05:28 PM
Hi Nikolay,

I tried adding the same code (Attributes = new Dictionary<string, object> { { "TypeAttribute", "Type1" } }) to a test WCF service and it seemed to work as expected - calling node.get_attributes().getAttribute("TypeAttribute") on the client-side returns the expected "Type1" and when the node is later expanded, it has the proper attribute values too. Can you please check if you are using the latest version of RadControls?

All the best,
Dimitar Milushev
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
Tags
TreeView
Asked by
Nikolay
Top achievements
Rank 1
Answers by
Dimitar Milushev
Telerik team
Share this question
or