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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Checkbox Issue

Thread ID:

Created:

Updated:

Platform:

Replies:

144734 May 20,2019 12:26 PM UTC May 22,2019 12:50 PM UTC Angular - EJ 2 3
loading
Tags: Treeview
Neha Das
Asked On May 20, 2019 12:26 PM UTC

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

Christopher Issac Sunder K [Syncfusion]
Replied On 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 
  1. Did you remove the parent checkbox in your application while you check/uncheck the node?
  2. You have mentioned “when I click on same parent 1st child element I get the correct value”. What did you mean correct value here?
  3. While clicking on the child node do you wish to get the child node data or parent node data or both?

Thanks, 
Christo 


Neha Das
Replied On May 22, 2019 05:58 AM 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 
  1. Did you remove the parent checkbox in your application while you check/uncheck the node?
  2. You have mentioned “when I click on same parent 1st child element I get the correct value”. What did you mean correct value here?
  3. 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.

Christopher Issac Sunder K [Syncfusion]
Replied On 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 


CONFIRMATION

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

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

Live Chat Icon For mobile
Live Chat Icon