at the moment, I am having following scenario:
and the code behind looks something like below :
Now,
I want to set the link of the imageButon and hyperLink programatically. Right now the link target is same for all the nodes, including the parent nodes, but I want to set it dynamically.
Thanks,
-Aarsh
<telerik:RadTreeView ID="RadTreeView1" runat="server"> <NodeTemplate> <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/Scanner5 32x32.png" PostBackUrl="http://www.hotmail.com" /> <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="http://www.bing.com">[ View ] </asp:HyperLink> <%# DataBinder.Eval(Container, "Text") %> </NodeTemplate></telerik:RadTreeView>and the code behind looks something like below :
RadTreeNode category1 = new RadTreeNode("Group1", "Group1"); RadTreeNode Category1Nodes; RadTreeNodeCollection radCollection = new RadTreeNodeCollection(category1); for (int i = 10 - 1; i >= 0; i--) { Category1Nodes = new RadTreeNode(i.ToString(), i.ToString()); category1.Nodes.Add(Category1Nodes); } RadTreeView1.Nodes.Add(category1); RadTreeNode category2 = new RadTreeNode("Group2", "Group2"); RadTreeNode Category2Nodes; radCollection = new RadTreeNodeCollection(category2); for (int i = 5 - 1; i >= 0; i--) { Category2Nodes = new RadTreeNode(i.ToString(), i.ToString()); category2.Nodes.Add(Category2Nodes); } RadTreeView1.Nodes.Add(category2);Now,
I want to set the link of the imageButon and hyperLink programatically. Right now the link target is same for all the nodes, including the parent nodes, but I want to set it dynamically.
Thanks,
-Aarsh