Select all checkbox

I have a Dialog Modal that pops up with a Grid on it with a check box 

   <e-column type='checkbox' :allowFiltering='false' :allowSorting='false' width='60'></e-column>  I would like to have all of the check boxes checked / selected when it displays.  If I use  

 this.$refs.gridDialog.selectRowsByRange(0,1);  This only works with a visible grid.

How can I make this work?  Is there something else that I should be using?


3 Replies

RS Rajapandiyan Settu Syncfusion Team April 22, 2022 10:11 AM UTC

Hi William, 


Thanks for contacting Syncfusion support.


We have prepared a simple sample to reproduce the reported behavior at our end, but it was unsuccessful at our end. Find the below sample for your reference.


Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/vue2_grid_inside_dialog1688404323.zip


By using the dataBound event of Grid, we have selected the records.


 

              dataBound: function () {

                this.$refs.grid.ej2Instances.selectRowsByRange(0, 1);

              },

 


Kindly share the below details to replicate the issue at our end.


  1. Share the complete code files you have used.
  2. Share the package.json file.
  3. Are you using Vue 2 or Vue 3 project?
  4. Where do you execute the selectRowsByRange method in your project? Share the scenario of this.
  5. If possible, share the issue reproducible sample or try to make the issue in given sample.


Regards, 

Rajapandiyan S



WM William Morgenweck April 22, 2022 05:26 PM UTC

Thanks for the help-- after using  :dataBound="dataBound" and


dataBound: function () {

                this.$refs.grid.ej2Instances.selectRowsByRange(0, 1);

              },

 



that fixed the issue.  Thank you



RS Rajapandiyan Settu Syncfusion Team April 25, 2022 04:42 AM UTC

Hi William,


We are glad that you have achieved your requirement with the provided solution.


Please get back to us if you need further assistance.


Regards,

Rajapandiyan S


Loader.
Up arrow icon