- Home
- Forum
- Angular - EJ 2
- After checkbox click
After checkbox click
After I click on checkbox of my tree.I am not able to create another tree structure after selection. Does the tree only load at the beginning?
Attachment: src_be2ddc14.zip
It is in data-fetch component
Attachment: src_be2ddc14.zip
SIGN IN To post a reply.
5 Replies
VK
Vinoth Kumar Sundara Moorthy
Syncfusion Team
June 3, 2019 12:19 PM UTC
Hi Neha,
Good day to you.
We have validated the reported issue in your provided sample and we found that you have not mapped the fields properly while assigning the dataSource which caused this issue. Please find the modified code snippets.
|
for (let k = 0; k < this.showData.length; k++) {
this.showSelection.push(this.showData[k].text);
if (this.showData[k]["parentID"] === null) {
this.showData[k].hasChildren = true;
}
}
this.dataSelection = { dataSource: this.showData, id: 'id', parentID: 'parentID', text: 'text', hasChildren: 'expanded', data: 'data' }; |
Please check the below screenshot,
Modified sample link: http://www.syncfusion.com/downloads/support/forum/144987/ze/my-app2124566603
Could you please check the above sample and get back to us if you need any further assistance in this?
Regards,
Vinoth Kumar S
ND
Neha Das
June 3, 2019 02:26 PM UTC
I am not able to remove the same by unchecking the box.It seems to hold only one data value while unchecking
VK
Vinoth Kumar Sundara Moorthy
Syncfusion Team
June 4, 2019 11:27 AM UTC
Hi Neha,
Good day to you.
We have checked your query “it holds one data value while unchecking” and we can able to get all the data values while unchecking the same node. Please check the below screenshot,
In your source code, you have not reset the datasource using this.dataSelection while unchecking the node. Could you please provide more information about your exact use case scenario whether you need to reset the datasource of second Treeview while unchecking the node or do you want to remove the nodes based on condition? Based on this we will validate and provide you better solution quickly.
Regards,
Vinoth Kumar S
ND
Neha Das
June 4, 2019 11:35 AM UTC
I have done it.Thank you for the response
KM
Kanagambigai Murugan
Syncfusion Team
June 5, 2019 06:15 AM UTC
Hi Neha ,
Good day to you.
Thanks for the update. Please get back to us if you need any further assistance.
Regards,
Kanagambigai
SIGN IN To post a reply.
- 5 Replies
- 3 Participants
-
ND Neha Das
- May 31, 2019 07:19 AM UTC
- Jun 5, 2019 06:15 AM UTC