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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

OnClick Event

Thread ID:





116013 Mar 17,2014 10:15 AM UTC Mar 19,2014 04:35 AM UTC ASP.NET MVC (Classic) 3
Tags: TreeView
John Ashton
Asked On March 17, 2014 10:15 AM UTC


On click event to show ID only shows the tree id instead of the node clicked ID?

Please help,


    function CA_OnNodeClick(args) {
@(Html.Syncfusion().TreeView("CA_treeView", "CA_treeViewContents").ClientSideOnNodeClick("CA_OnNodeClick"))

Gurunathan A [Syncfusion]
Replied On March 17, 2014 11:41 AM UTC

Hi John,

Thanks for contacting Syncfusion support.


We have analysed that provided code: in that, you have tried to get the id of clicked node from first argument in clientsideonnodeclick event. But it is available in second argument of this event. Please refer the below code snippet.




@(Html.Syncfusion().TreeView("myTreeView", "treeView").Height(150).Width(200).ClientSideOnNodeClick("onclicktreenode"))


    <script type="text/javascript">

    function onclicktreenode(sender, args){






Note : First argument has Treeview control id and their properties and second one has clicked node id and its properties.


Please let us know if you have further queries on this.




John Ashton
Replied On March 17, 2014 01:20 PM UTC

Cheers Gurunathan works great.

Gurunathan A [Syncfusion]
Replied On March 19, 2014 04:35 AM UTC

Hi John,

Thanks for the update.


Please let us know if you required further assistance on this.





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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon