Where is Hideselection property on treeview control in VS 2005 aspx

Posted on 2009-05-28
Medium Priority
Last Modified: 2013-12-26
I have using Visual Studio 2005 to create a web application.  I have added a treeview control to the master document.  I'd like to set the hideselection property  to false so the node stays selected.  However, I cannot find where the property is.  It doesn't seem to be in the properties box on the control in design view and I cannot figure out where to place it in the source.  

<div id="MasterBodyLeft">
                <asp:TreeView ID="TreeView1" runat="server" ImageSet="Simple" Width="135px" ExpandDepth="0">
                    <ParentNodeStyle Font-Bold="False" />
                    <HoverNodeStyle Font-Underline="True" ForeColor="#5555DD" />
                    <SelectedNodeStyle Font-Underline="True" ForeColor="#404040" HorizontalPadding="0px"
                        VerticalPadding="0px" />
                        <asp:TreeNode NavigateUrl="~/Default.aspx" Text="Home" Value="Home"></asp:TreeNode>
                        <asp:TreeNode Text="Notes" Value="Notes" SelectAction="Expand">
                            <asp:TreeNode Text="Add" Value="Add"></asp:TreeNode>
                            <asp:TreeNode Text="Search" Value="Search"></asp:TreeNode>
                        <asp:TreeNode Text="Reports" Value="Reports" SelectAction="Expand">
                            <asp:TreeNode Text="Create" Value="Create"></asp:TreeNode>
                            <asp:TreeNode Text="View" Value="View"></asp:TreeNode>
                        <asp:TreeNode Text="Administration" Value="Administration" SelectAction="Expand">
                            <asp:TreeNode Text="Users" Value="Users" NavigateUrl="~/admin_users.aspx"></asp:TreeNode>
                            <asp:TreeNode Text="Permissions" Value="Permissions"></asp:TreeNode>
                            <asp:TreeNode Text="Note Categories" Value="Note Categories" NavigateUrl="~/admin_notecategories.aspx"></asp:TreeNode>
                            <asp:TreeNode NavigateUrl="~/admin_notegroups.aspx" Text="Note Groups" Value="Note Groups">
                    <NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black" HorizontalPadding="0px"
                        NodeSpacing="0px" VerticalPadding="0px" />

Open in new window

Question by:okcuser

Author Comment

ID: 24494121
I tried setting it via code and I get this message:
'HideSelection' is not a member of 'System.Web.UI.WebControls.TreeView'
    Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles form1.Load
        With TreeView1
            .HideSelection = False
        End With
    End Sub

Open in new window

LVL 96

Accepted Solution

Bob Learned earned 2000 total points
ID: 24503473
HideSelection is a WinForms TreeView property, not an ASP.NET property...

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question