I have a web service based treeview set up and basically what I'm aiming to do is give the node a target. The set up is that this treeview is in a left frame, and the nodes are images that will be loaded in the right hand frame. I'm running this through a web service and the RadTreeNodeData class doesn't have the "Target" attribute like the RadTreeNode variable does. Is there a way to have a target on the nodes? I've given my code below and after searching around, it's all that I've found. Let me know if I'm doing something incorrectly, thanks
<
telerik:RadTreeView
EnableViewState
=
"true"
ID
=
"treeImages"
runat
=
"server"
DataFieldID
=
"Id"
DataFieldParentID
=
"ParentId"
DataTextField
=
"Text"
DataValueField
=
"Value"
DataNavigateUrlField
=
"NavigateURL"
OnClientNodeDataBound
=
"OnClientNodeDataBoundHandler"
>
<
WebServiceSettings
Path
=
"FolderTree.aspx"
Method
=
"LoadPromotionNodes"
/>
<
DataBindings
>
<
telerik:RadTreeNodeBinding
Expanded
=
"false"
/>
</
DataBindings
>
</
telerik:RadTreeView
>
for
(
int
row = 0; row < rowMax; row++)
{
returnNode.Text = _returnArray[row, 0];
returnNode.Value = _returnArray[row, 1];
returnNode.Attributes[
"Target"
] =
"fraRightFrame"
;
returnNode.ExpandMode = TreeNodeExpandMode.WebService;
returnNode.NavigateUrl =
"images.aspx?loc="
+ _returnArray[row, 1];
result.Add(returnNode);
}
return
result.ToArray();
<script type=
"text/javascript"
>
function
OnClientNodeDataBoundHandler(sender, e) {
var
node = e.get_node();
var
target = node.get_attributes().getAttribute(
"Target"
);
node.get_attributes().setAttribute(
"Target"
, target);
}
</script>