Is there any way of viewing the DataItem property of a node from JavaScript?
Hi,
DataItem is not accessible on the client, it is the actual server side object that the node is bound to.
Ok, we're trying to replicate the functionaility we used to have with the old web tree. We build our tree in codebehind as our entity based datasource is complex and it gives us greater control in terms of highlighting nodes and restoring the tree state. We used to take advantage of the tag property of node. This allowed us to attach any serialisable object to a node and get the value from the client, in practise and for performance this was normally restricted to an int normally representing the id of the dataitem in question. How can we accomplish this with the new tree?
Well, in the new tree, the nodes have a Value property. This is only a string, but it can be get/set on both the server on the client. It can store information about a node other than the visible text. Maybe you can use this to accomplish what you need? For reference, to access on the client, node.get_value() & node.set_value("newString")
regards,
David Young
Hi, I understand that the dataitem is only a server side object but the Tag property of a node on the old grid was also available on the client. Is there a similar property on the new webtree?This was a very useful feature as you could set this to an id field then access it on the client.