- Home
- Forum
- Angular - EJ 2
- Checkbox Issue
Checkbox Issue
I am not getting exact checkbox click value.I am using args,when I click on same parent 1st child element I get the correct value but when I click on the 2nd child same parent element,I get the parent name first which is not what I need.Please help
Attachment: src_e8a0d929.zip
Attachment: src_e8a0d929.zip
SIGN IN To post a reply.
3 Replies
CI
Christopher Issac Sunder K
Syncfusion Team
May 21, 2019 01:02 PM UTC
Hi Neha,
Greetings from Syncfusion support.
We have tried to debug the sample you provided to us. But could not able to access it due to proxy issues. However, We have checked the reported issue at our end . But could not reproduce it. When we clicked the 2nd child under the same parent element, we can able to get both the parent and child element details. Please check the output image
Please check the above sample and get back to us with the following details
- Did you remove the parent checkbox in your application while you check/uncheck the node?
- You have mentioned “when I click on same parent 1st child element I get the correct value”. What did you mean correct value here?
- While clicking on the child node do you wish to get the child node data or parent node data or both?
Thanks,
Christo
Hi Neha,
Greetings from Syncfusion support.
We have tried to debug the sample you provided to us. But could not able to access it due to proxy issues. However, We have checked the reported issue at our end . But could not reproduce it. When we clicked the 2nd child under the same parent element, we can able to get both the parent and child element details. Please check the output image
Please check the above sample and get back to us with the following details
- Did you remove the parent checkbox in your application while you check/uncheck the node?
- You have mentioned “when I click on same parent 1st child element I get the correct value”. What did you mean correct value here?
- While clicking on the child node do you wish to get the child node data or parent node data or both?
Thanks,Christo
I meant I just want the child node data,the checkbox I am clicking on I want only that data on click.I don't want parent nodes or subchildren nodes to be added in my click method.I want it to be shown whenever I check it or uncheck it.
CI
Christopher Issac Sunder K
Syncfusion Team
May 22, 2019 12:50 PM UTC
Hi Neha,
If you want to get the child node data which are clicking you can get that data in the nodeChecking event instead of nodeChecked event. Because the nodeChecked event get triggered before the each node is state is successfully checked. So you can get the checked node data alone in that event using following code block
|
public nodeChecking(args) {
if (args.isInteracted) {
debugger
console.log(args.data);
}
} |
Please find the corresponding output image.
Note: If you want the check box to behave independently you can make use of autoCheck property
Please get back to us if you need any further assistance.
Thanks,
Christo
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
ND Neha Das
- May 20, 2019 12:26 PM UTC
- May 22, 2019 12:50 PM UTC