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

How to pre select the checkbox column

Thread ID:

Created:

Updated:

Platform:

Replies:

148459 Oct 21,2019 08:40 AM UTC Oct 31,2019 02:38 AM UTC JavaScript - EJ 2 5
loading
Tags: TreeGrid
Sarathkumar, K (K.)
Asked On October 21, 2019 08:40 AM UTC

Hi Experts,

I  have a query regarding the checkbox column. While creating column, I used showCheckBox as true to create check box column.
 How to pre select "Test1" and" "Test3"   while loading the tree table. 






Padmavathy Kamalanathan [Syncfusion]
Replied On October 22, 2019 03:42 PM UTC

Hi SarathKumar, 

Thanks for contacting Syncfusion Forums. 

QUERY: How to preselect the checkbox column 

From your query we understand that you need to select the checkbox while the rendering the treegrid. We suspect that you need to check/uncheck the checkbox based on the filed value. 

For achieving that, you can use “displayAsCheckBox” property which render checkbox(checked/unchecked) based on the field value. 

Please refer the below sample, 

Please refer the below help documentations, 

Please get back to us if we have mis interpreted your query 

Regards, 
Padmavathy Kamalanathan 



Sarathkumar, K (K.)
Replied On October 22, 2019 04:17 PM UTC

Hi Padmavathy Kamalanathan,

Need to create a separate column if “displayAsCheckBox” is used. But "showCheckBox" allows a check box within a column along with display name.
Also if I use the "displayAsCheckBox", need to double click to make it checked/unchecked . But with "showCheckBox" , check/unchecked will happen with a single click.
Please advice how to preselect with "showCheckBox" option 

Padmavathy Kamalanathan [Syncfusion]
Replied On October 23, 2019 01:25 PM UTC

Hi SarathKumar, 

Thanks for your update. 

QUERY: How to preselect with “showCheckbox” option 
 
From your query we understand that you need to use “showCheckbox” property, in order to select particular record’s checkbox at initial rendering itself. 

This can be achieved by selecting those checkboxes using “selectCheckboxes” method in “dataBound” event. 

Please refer the below help documentation, 

In dataBound event, you need to call the selectCheckboxes method with the rowIndices (rowindices of records which you need to preselect) as parameter. 

Please refer the below sample, 

If you have further queries, please get back to us. 

Regards, 
Padmavathy Kamalanathan 


Sarathkumar, K (K.)
Replied On October 29, 2019 11:18 AM UTC

Hi Padmavathy Kamalanathan,
 The solution provided fulfilled my requirement ...

I have another query regarding the column visibility. How to make the specific column (say, checkbox column ) visible on a button click?

Thanks and regards,
Sarathkumar.K

Padmavathy Kamalanathan [Syncfusion]
Replied On October 31, 2019 02:38 AM UTC

Hi SarathKumar,

Thanks for your update. You can show or hide column in buttonclick by using showColumns and hidColumns method.

Please check the below help documentations,
https://ej2.syncfusion.com/documentation/api/treegrid/#hidecolumns


 We have checked this with checkbox column and found issue with header column's checkbox. Thank you for the taking the time to report the issue and helping us improve our product. At Syncfusion we are committed to fixing all the validated defect (subject to technological feasibility and Product Development Life Cycle) and including its fix in our subsequent release. So fix for the issue will be included in our upcoming patch release which is expected to be rolled out in the second week of November 2019.
 
  
You can track the current status of your request, review the resolution timeline and contact us for any further inquiries through this link 

 
Disclaimer: The feedback link is in review state and you can check it once it is validated 
  
Note: To view the above feedback, kindly login into your account. 
  
If you have further queries, please get back to us. 
  
Regards, 
Padmavathy Kamalanathan 
  


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