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

ejs-treeview with different context menus based on the node type


I have a TreeView in my _Layout.cshtml file that gets data from remote


I'm not able to get the context Menu based on the node type.

Could you please provide an example? 

1 Reply

CI Christopher Issac Sunder K Syncfusion Team March 21, 2019 07:05 AM

Hi John, 

Thank you for contacting Syncfusion support. 

We have prepared sample based on your requirement. In that sample, we rendered treeview in _Layout.cshtml file that gets data from remote as you have mentioned. We have set data-type for each treeview node using htmlAttributes field property. Based on that data-type, we set different context menu for different level. Please find the sample from the following link. 


Please check the sample and let us know if you need any further assistance. 


Live Chat Icon For mobile
Up arrow icon