I have a TreeView like this:
<telerik:RadTreeView ID="TreeView" runat="server" DataTextField="Title" DataFieldID="CategoryID" DataValueField="ContentTypeID" DataFieldParentID="ParentID"></telerik:RadTreeView>
I would like to get the value of CategoryID on client side, so I try to get the attribute of DataFieldID, but can't find a way to.
I have tried:
treeNode.get_attributes().getAttribute("DataFieldID");
but that returns undefined.
This page http://www.telerik.com/help/aspnet-ajax/treeview-client-objects-radtreenode.html shows many attributes that their value can be retrieved with methods, like:
get_navigateUrl();
get_imageUrl();
get_toolTip();
...
but there is nothing for DataFieldID.
I CAN get the value of CategoryID by creating a custom attribute ("CategoryIDCustom" for example), then get by treeNode.get_attributes().getAttribute("CategoryIDCustom");
But I think why do we need to create a custom attribute, while there is ALREADY one for it?
Now, I am living with the way of creating a custom attribute.
Is there a different way to get that? or am I missing something? Please help.
Thank you.
<telerik:RadTreeView ID="TreeView" runat="server" DataTextField="Title" DataFieldID="CategoryID" DataValueField="ContentTypeID" DataFieldParentID="ParentID"></telerik:RadTreeView>
I would like to get the value of CategoryID on client side, so I try to get the attribute of DataFieldID, but can't find a way to.
I have tried:
treeNode.get_attributes().getAttribute("DataFieldID");
but that returns undefined.
This page http://www.telerik.com/help/aspnet-ajax/treeview-client-objects-radtreenode.html shows many attributes that their value can be retrieved with methods, like:
get_navigateUrl();
get_imageUrl();
get_toolTip();
...
but there is nothing for DataFieldID.
I CAN get the value of CategoryID by creating a custom attribute ("CategoryIDCustom" for example), then get by treeNode.get_attributes().getAttribute("CategoryIDCustom");
But I think why do we need to create a custom attribute, while there is ALREADY one for it?
Now, I am living with the way of creating a custom attribute.
Is there a different way to get that? or am I missing something? Please help.
Thank you.