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

ej.treeView databinding with checkboxes

Thread ID:





113920 Oct 17,2013 06:11 AM UTC Nov 1,2013 06:42 AM UTC JavaScript 3
Tags: ejTreeView
ilker kose
Asked On October 17, 2013 06:11 AM UTC


I have some questions about ej.treeView.

The control can't be fully checkboxes when i use datasource with "showCheckbox: true".

I try to combine two examples in the samples\treeview folder (localdatabinding.html, checkbox.html)

But if set, "showCheckbox: true" then checkbox shows only on child nodes not on the parent (like not checkbox.html). I want to see a checkbox on the parent too.

The other thing is that when i click the first child node of the parent node, it's checkbox fully filled (like it is a parent node and it has one or more checked childs) but the other clicked childs looking normal.

Screen caps:

The  code:
                var localData = [
                   { id: 1, name: "Discover Music", hasChild: true, expanded: true, isChecked: true },
                   { id: 2, pid: 1, name: "Hot Singles" },
                   { id: 3, pid: 1, name: "Rising Artists" },
                   { id: 4, pid: 1, name: "Live Music" },
                   { id: 6, pid: 1, name: "Best of 2013 So Far" },
                   { id: 7, name: "Sales and Events", hasChild: true, expanded: true },
                   { id: 8, pid: 7, name: "100 Albums - $5 Each" },
                   { id: 9, pid: 7, name: "Hip-Hop and R&B Sale" },
                   { id: 10, pid: 7, name: "CD Deals" },
                   { id: 11, name: "Categories", hasChild: true },
                   { id: 12, pid: 11, name: "Songs" },
                   { id: 13, pid: 11, name: "Bestselling Albums" },
                   { id: 14, pid: 11, name: "New Releases" },
                   { id: 15, pid: 11, name: "Bestselling Songs" },
                   { id: 16, name: "MP3 Albums", hasChild: true },
                   { id: 17, pid: 16, name: "Rock" },
                   { id: 18, pid: 16, name: "Gospel" },
                   { id: 19, pid: 16, name: "Latin Music" },
                   { id: 20, pid: 16, name: "Jazz" },
                   { id: 21, name: "More in Music", hasChild: true },
                   { id: 22, pid: 21, name: "Music Trade-In" },
                   { id: 23, pid: 21, name: "Redeem a Gift Card" },
                   { id: 24, pid: 21, name: "Band T-Shirts" },
                   { id: 25, pid: 21, name: "Mobile MVC"}];

                    fields: { id: "id", parentId: "pid", text: "name", hasChild: "hasChild", dataSource: localData, expanded: "expanded"},
                    showCheckbox: true



John Arokyaraj V [Syncfusion]
Replied On October 18, 2013 11:12 AM UTC

Hi Ilker,


Thank you using Syncfusion products.


Query: Checkbox not appears in root element on TreeView widget while applying these two properties ‘showCheckbox: true’ and dataSource?


We have analyzed the reported issue with our sample; we are unable to reproduce the issue. Can you please check with the sample attached? If still you face the problem, please revert us by modifying the sample based on your application along with replication procedure. This would be helpful for us to serve you.



Please let us know if you need any further assistance.


John Arokyaraj V


ilker kose
Replied On October 29, 2013 01:29 PM UTC

Hi, thank you very much for help.

When i changed
<ul id="treeView"></ul>
 <div id="treeView"></div>
then it's fixed.

Now there are 2 things for fix, i really tried a lot of things.
First one is, i added images first 3 elements.
The image of parent is after the chechbox.
But the image of childs before the checkbox. Is it true view?

The other one is, my data for binding has fully "isChecked: true" for all elements.
But the second Parent says that some child elements is not checked.
Am i missing something?

Thanks again.
ps. the picture in below and the files in the attachment.


Saravanan G [Syncfusion]
Replied On November 1, 2013 06:42 AM UTC

Hi Ilker,


Thank you for your update.


Query 1:  First one is, i added images first 3 elements, the image of parent is after the chechbox.


Query 2: The other one is, my data for binding has fully "isChecked: true" for all elements.


We are able to reproduce the above issues in TreeView control and we have logged an Issue report on these. The fix for these issues will be include in our upcoming release which will be available in first week of December 2013. So please be patience until the issue has been fixed.


Please let us know if you need any further assistance.



Saravanan G.


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

or the page will be automatically redirected to 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