Peter,
If it is the TreeView Control; try this
Gets or sets a TreeNode object that represents the selected node in the
TreeView control. Please start here"
http://longhorn.msdn.microsoft.com/l...webcontrols/c/
treeview/p/selectednode.aspx
<%@ Page Language="C#" %>
<script runat="server">
void SpacingIndex_Changed(Object sender, EventArgs e)
{
// Set the vertical spacing of the selected node based on the value
selected by the user.
LinksTreeView.SelectedNodeStyle.VerticalPadding =
Convert.ToInt32(SpacingList.SelectedItem.Text);
}
void ColorIndex_Changed(Object sender, EventArgs e)
{
// Set the foreground (font) color of the selected node based on
the value selected by the user.
LinksTreeView.SelectedNodeStyle.ForeColor =
System.Drawing.Color.FromName(ColorList.SelectedIt em.Text);
}
void Select_Change(Object sender, EventArgs e)
{
Message.Text = "You selected: " + LinksTreeView.SelectedNode.Text;
}
--------------------
Thread-Topic: Simple question on Treeview?
thread-index: AcQCF4+B4d7YB7S9Tay6VlBKJ7Y7hQ==
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
From: "=?Utf-8?B?UGV0ZXI=?=" <an*******@discussions.microsoft.com>
Subject: Simple question on Treeview?
Date: Thu, 4 Mar 2004 10:36:08 -0800
Lines: 6
Message-ID: <49**********************************@microsoft.co m>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.languages.csharp
Path: cpmsftngxa06.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:226424
NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
Hello,
Thanks for reviewing my question. I would like to know how can I
programmatically select a node?
Thanks in Advance
Peter
Cheers,
johnKn [MS-SDK]
-Please do not send email directly to this alias. This alias is for
newsgroup purposes only
-This posting is provided “AS IS” with no warranties, and confers no rights.
-To provide additional feedback about your community experience please send
e-mail to:
sd*****@microsoft.com