Home All Groups Group Topic Archive Search About

asp:treeview, expand, index of node

Author
8 Feb 2006 12:02 AM
sean.drexler
I am trying to figure out how to capture the index or a reference to a
asp:treeview node in asp.net 2.0 when the node is expanded.  It appears
that the sender object for the event handler is the treeview control.
The problem is that a node being expanded or collapsed does not set the
selectedNode in the control.  Is there anyplace that the index of the
node firing the event is stored?
Sean

Author
9 Feb 2006 3:45 PM
DWS
Sean,

Selectaction property is in the treeview databindings collection set it to
select or selectexpand.

<asp:TreeNodeBinding DataMember="Category" TextField="Name"
SelectAction="SelectExpand"
                    ShowCheckBox="False" ToolTip="Select Category" />

Good Luck
DWS


Show quoteHide quote
"sean.drex***@gmail.com" wrote:

> I am trying to figure out how to capture the index or a reference to a
> asp:treeview node in asp.net 2.0 when the node is expanded.  It appears
> that the sender object for the event handler is the treeview control.
> The problem is that a node being expanded or collapsed does not set the
> selectedNode in the control.  Is there anyplace that the index of the
> node firing the event is stored?
> Sean
>
>