My code
output

Actual need to

My code
output

Actual need to

Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mithun PradhanPosted Oct 13, 2023, 6:56 AM
Prasad RaveendranPosted Oct 12, 2023, 1:29 AM
It appears that you're using the Essential JS 2 (Syncfusion) TreeView component in an ASP.NET Core application and you want to show checkboxes only for child nodes. You can achieve this by customizing the TreeView using the
nodeTemplateproperty and conditionally showing the checkboxes for child nodes.Here's an example of how you can modify your code to achieve this:
In this modified code, I added a
nodeTemplateinside thee-treeview-fieldselement. Inside this template, I used a conditional check to display a checkbox only if the current node has children (i.e., it's a child node). This way, checkboxes will be shown for child nodes only, and the parent nodes won't have checkboxes.Make sure that you adjust the template and styles as needed to match your design and requirements.