Friday, August 3

How to add a TreeView inside a DropDownList

Step-1: Add a TextBox to your Page.

<asp:TextBox ID="Module" runat="server"></asp:TextBox>
Step-2: Add a Panel and place a treeview inside it.
<asp:Panel ID="pnl" runat="server">
<asp:TreeView ID="ModuleTreeView" runat="server" ShowLines="true" PopulateNodesFromClient="false" BackColor="#99CCFF" style="width:100%" ShowExpandCollapse="false">
Step-3: Add a Ajax DropdownExtender and set its TargetControlID to the TextBox.
<asp:DropDownExtender ID="DropDownExtender1" runat="server" TargetControlID="Module"
Step-4: Then write your own method to bind the treeview.

The final output is:

Thanks Shibashish Mohanty

No comments:

Post a Comment

Please don't spam, spam comments is not allowed here.

shibashish mohanty