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
close icon

OnClick Event


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"))

3 Replies

GA Gurunathan A Syncfusion Team 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.




JA John Ashton March 17, 2014 01:20 PM UTC

Cheers Gurunathan works great.

GA Gurunathan A Syncfusion Team March 19, 2014 04:35 AM UTC

Hi John,

Thanks for the update.


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




Live Chat Icon For mobile
Up arrow icon