We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Tree view link

Thread ID:

Created:

Updated:

Platform:

Replies:

93117 Feb 24,2010 09:27 AM Feb 26,2010 02:43 AM ASP.NET Web Forms (Classic) 1
loading
Tags: Tools
Jorge Mello
Asked On February 24, 2010 09:27 AM

I am using the following code ........

'>http://www.w3.org/1999/xhtml">

Untitled Page









borderstyle="Solid" borderwidth="1px" height="80px" width="160px"
DataSourceID="SqlDataSource1" dir="ltr" EditNode="False" ClientSideOnNodeSelect="nodeSelected(this)" >

DataMember="DefaultView"
Expanded="True"
IDField="id"
ParentIDField="parentId"
TextField="Text"
/>


ConnectionString="<%$ ConnectionStrings:local %>"
SelectCommand="SELECT [id], [parentId], [Text], [Target] FROM [Links]">





The warning is being displayed = [object Object] and not the value selected.
Where is the mistake?

tks

Lakxman Kumar C [Syncfusion]
Replied On February 26, 2010 02:43 AM

Hi Jorge,

Thank you for your interest in Syncfusion Products.

The ClientSideOnNodeSelect event of the treeview returns the clientside object for the selected node. That is why when the 'node' variable was alerted, [object Object] was displayed. If your intention is to alert the text of the selected node it can be done by the Text propery of the selected node. Kindly find below the modified code snippet to achieve this.

[Javascript]

function nodeSelected(node)
{
alert(node.Text);
}


Also I have created a simple sample for your convenience and it can be downloaded from the link below.

http://help.syncfusion.com/samples/Tools.Web/8.1.0.30/65127/TreeView.zip

Kindly view the above sample, reproduce it in your application and please let me know if this helps.

Regards,
Lakxman Kumar C

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;