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. Image for the cookie policy date
close icon

Checkbox Selection

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

5 Replies

PS Pavithra Subramaniyam Syncfusion Team 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. 



SU sunithra 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


TS Thavasianand Sankaranarayanan Syncfusion Team 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. 



SU sunithra March 15, 2019 11:42 AM UTC

Hi

Fixed the above issues. Thank You

Regards,

Sunithra.C


TS Thavasianand Sankaranarayanan Syncfusion Team 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. 


Loader.
Live Chat Icon For mobile
Up arrow icon