I have two panes, In my left pane, I have UltraWebTree with all nodes. When I click the node I need to load User control in the right hand pane. Can you please tell me how to load user control.
I have 3 nodes and each of them should load different usercontrol.
Any ideas
Thanks
Hello,
You can achieve the described functionality using the following code:
protected void UltraWebTree1_NodeClicked(object sender, Infragistics.WebUI.UltraWebNavigator.WebTreeNodeEventArgs e)
{
Node selectednode = UltraWebTree1.SelectedNode;
if (selectednode.Text=="LoadUserControl2")
UserControl testcntrl = (UserControl)Page.LoadControl("Usrcntrl2.ascx");
Panel1.Controls.Add(testcntrl);
Debug.WriteLine("node2 selected");
}
I have also put together a sample for you to review.
Please let me know if you need further assistance.
Bhadresh