IE Treeview.SelectedNodeIndex always returns 0

P

Prashant Bhuptani

Hello all,

I am using the IE Treeview webcontrol.

In the .aspx file the webcontrol is defined in the following manner:

<iewc:treeview id="tvStandard" runat="server"></iewc:treeview>

The tree is populated from an XML file by setting the TreeNodeSrc property
in the codebehind page.

I then select a node and on a click of a button I need the value of the
selected node. The codebehind for the onclick event of the button is as
follows:

Microsoft.Web.UI.WebControls.TreeNode tn =
tvStandard.GetNodeFromIndex(tvStandard.SelectedNodeIndex)

The SelectedNodeIndex property is expected to return me the right node index
in the "0.1" type of format. However, it
always returns back "0" regardless of whichever node I select.

Does anyone know the cause for this kind of behavior? Am I missing something
anywhere?

Any help would be highly appreciated.

Thanks.

Regards,
-Prashant
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top