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 Selection

Thread ID:

Created:

Updated:

Platform:

Replies:

143234 Mar 11,2019 11:08 AM UTC Mar 15,2019 11:47 AM UTC Angular - EJ 2 5
loading
Tags: Grid
sunithra
Asked On March 11, 2019 11:08 AM UTC

Hi

i Need a code for On Selecting the checkbox in particular column of  Grid  all the other checkbox must be checked in the row.




Regards,

Sunithra.C

Pavithra Subramaniyam [Syncfusion]
Replied On March 12, 2019 06:20 AM UTC

Hi sunithra, 
 
Greetings from Syncfusion, 
 
Before providing a solution to your query could you please provide the below details that will be helpful for us to provide a better solution as early as possible. 
 
  1. In what way you are rendering the checkboxes in Grid rows(column template, row template or type as checkbox)
  2. Share your Grid code
 
Regards, 
Pavithra S. 


sunithra
Replied On March 12, 2019 06:59 AM UTC

Hi

Attached  my code  kindly look at it and please give a solution for it.

Thanks in Advance .

Regards,

Sunithra.C

Attachment: codefile_1e6615f6.zip

Thavasianand Sankaranarayanan [Syncfusion]
Replied On March 13, 2019 05:29 AM UTC

Hi Sunithra, 

Thanks for your Update. 

Query : Need a code for On Selecting the checkbox in particular column of  Grid  all the other checkbox must be checked in the row 

We have analyzed your query and we suggest to use the changed event of the checkbox component to change the other checkboxes checked state. Please refer to the below sample and documentation for your reference, 

... 
allSelected(args){                   //you can change any checkbox checked property by its instance 
      args.event.target.closest('tr').querySelectorAll('.e-checkbox')[0].ej2_instances[0].checked = args.checked
      args.event.target.closest('tr').querySelectorAll('.e-checkbox')[1].ej2_instances[0].checked = args.checked; 
      args.event.target.closest('tr').querySelectorAll('.e-checkbox')[2].ej2_instances[0].checked = args.checked; 
      args.event.target.closest('tr').querySelectorAll('.e-checkbox')[3].ej2_instances[0].checked = args.checked; 
    } 
... 



Please get back to us for further assistance. 

Regards, 
Thavasianand S. 


sunithra
Replied On March 15, 2019 11:42 AM UTC

Hi

Fixed the above issues. Thank You

Regards,

Sunithra.C

Thavasianand Sankaranarayanan [Syncfusion]
Replied On March 15, 2019 11:47 AM UTC

Hi Sunithra, 

We are happy that the problem has been solved. 
 
Please get back to us if you need any further assistance.  

Regards, 
Thavasianand S. 


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