Advertisement
I want to Expand and Collapse Asp TreeView control using button, In page load i expand all nodes. button will show "hide". While clicking hide it will show "Show" all nodes will Collapse.
In Ascx page:
<asp:Button runat="server" ID="btnhide" OnClick="btnhide_onclick" Text="Hide" />
<asp:TreeView ID="TreeViewID" runat="server">
</asp:TreeView>
In Pageload:
TreeViewID. ExpandAll();
Button OnClick
protected void btnhide_onclick(object sender, EventArgs e)
{
if (btnhide.Text == "Hide")
{
TreeViewID. CollapseAll();
btnhide.Text = "Show";
}
else
{
if(btnhide.Text == "Show all")
{
TreeViewID. ExpandAll();
btnhide.Text = "Hide all";
}
}
}
Choosing to undergo LASIK surgery Austin means not only benefiting from high-quality medical care but also enjoying the vibrant culture and lifestyle the city offers. Many clinics in the area pride themselves on providing personalized care, ensuring that every patient receives thorough consultations and tailored treatment plans.
ReplyDeleteThe recovery process is usually swift, allowing individuals to quickly return to their daily routines while enjoying the newfound freedom that comes with improved eyesight. Whether you're a lifelong resident or new to the area, considering LASIK can be a transformative step towards a brighter and clearer future.