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. Image for the cookie policy date

Retrieving UniqueID from TreeView node on click

When I build a TreeViewModel in my controller, I set each TreeNodeItem's UniqueID to a value that will help me identify what item has been clicked on in the tree view. If I expand a node, I can see that the correct UniqueID value is picked up by the ClientSideOnNodeExpand handler. However, if I just click on a node (without expanding), I don't get the UniqueID, I just get the text of the item. I've tried changing the ClientSideOnNodeClick handler to get the unique Id but not sure how to do this. Here's what I've got in that handler:

function ClientSideNodeClick(sender) {

$('#EventLog').val($('#EventLog').val() + sender.nodeText + " Node is Selected" + "");
sender._handled = true;
}

The handler for expand looks similar (except it uses 'args' instead of 'sender' as the parameter name:

function ClientsideExpand(args) {

$('#EventLog').val($('#EventLog').val() + args.nodeText + " Node is Expanded" + "");
args._handled = true;
}

Why do I get different results from these two events? I want to get the UniqueID in both cases.

Bob

1 Reply

SK Santhosh Kumar A Syncfusion Team November 6, 2009 04:47 AM UTC

Hi Bob,

Thanks for your interest in Syncfusion products.

Please create an DT incident for your query so that we can update with the patch available.

You can create the DT incident from the following link.
http://www.syncfusion.com/account/dashboard

In the interests of maintaining confidentiality, we have a policy of not sharing patches or otherwise proprietary customer specific information in the public Forum.

Best Regards,
Santhosh Kumar.A

Loader.
Live Chat Icon For mobile
Up arrow icon