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

RadTreeView & Attributes (Client and Server side)

1 Answer 104 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Suzi
Top achievements
Rank 1
Suzi asked on 16 Jul 2008, 07:53 AM
Hi, I added an attribute into each node of a radtreeview (server side) : node.Attributes.Add("nodeType", "image");

Next, in javascript (client side), I tried to get the value of the attibute, but the attribute 'nodeType' of the node clicked is undefined.

Is it normal ? How may I to resolve it ?

function
RadTreeViewAfterClientClick(node,afterClientClickFct){
if(node != null){
var atts = node.get_attributes();
var nodeType = atts.getAttribute('nodeType'); /*(Undefined)*/
}
}

Thanks in advance,

1 Answer, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 16 Jul 2008, 07:59 AM
Hello Suzi,

The arguments of the OnClientNodeChecked event are not correct. All client-side events of RadControls for ASP.NET Ajax receive two arguments - sender, eventArgs (much the same as server-side events).

Please check this help topic for correct usage of the OnClientNodeChecked event.

Regards,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
TreeView
Asked by
Suzi
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or