Discrepancy in events fired on select/deselect all rows in grid

Hi.

There seems to be a discrepancy in the events that are fired when all grid rows are selected/deselected by clicking the checkbox in the header row of the grid:


The grid is defined as follows:
<ejs-grid #sagaMCGrid [dataSource]='sagaMCDrugs'  width="100%" height='550px' (rowSelected)='onSagaMCGridRowSelected($event)'(rowDeselected)='onSagaMCGridRowDeselected($event)'>
The functions are defined:
onSagaMCGridRowSelected(argsRowSelectEventArgs) {
    console.log('onSagaMCGridRowSelected'args)
}  

onSagaMCGridRowDeselected(argsRowDeselectEventArgs) {
    console.log('onSagaMCGridRowDeselected'args)
}

The output of the function when the checkbox in the header row is checked is:

The output of the function when the checkbox in the header row is unchecked is:


As you can see the property is called rowIndexes and isInteracted is true when checking the select all box but when unchecking it the property is called rowIndex and isInteracted is false. 

Why is isInteracted false when unchecking the select all box?
How can I distinguish between changes in the header row checkbox and changes in other checkboxes?

Installed versions:
    "@syncfusion/ej2""^18.1.43",
    "@syncfusion/ej2-angular-buttons""^18.1.42",
    "@syncfusion/ej2-angular-dropdowns""^18.1.43",
    "@syncfusion/ej2-angular-grids""^18.1.42",
    "@syncfusion/ej2-angular-inputs""^18.1.43",
    "@syncfusion/ej2-angular-layouts""^18.1.42",
    "@syncfusion/ej2-angular-navigations""^18.1.43",
    "@syncfusion/ej2-angular-popups""^18.1.43",


4 Replies

MS Manivel Sellamuthu Syncfusion Team April 9, 2020 11:22 AM UTC

Hi Skorri, 
  
Greetings from Syncfusion support. 
  
Query: Why is isInteracted false when unchecking the select all box? 
  
We have confirmed that the behavior is an issue from our side and logged a bug for same as “isInteracted value in the rowDeselected event is incorrect '”. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our upcoming Patch Release Apr 22nd 2020. 
  
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.  
  
  
Query: How can I distinguish between changes in the header row checkbox and changes in other checkboxes? 
  
In the above issue we have also considered to include a property to distinguish header and row checkbox. Until the fix included we suggest you to use the below way for this requirement. 
  
import { parentsUntil } from '@syncfusion/ej2-angular-grids'; 
onSagaMCGridRowSelected(args: RowSelectEventArgs) { 
    console.log('onSagaMCGridRowSelected', args) 
//based on the target we can differentiate the header and row checkboxes 
    if (parentsUntil(args.target, 'e-headercell')){ 
      console.log('Headercheckox selected'); 
    } 
    else { 
       console.log('Rowcheckox selected'); 
    } 
}   
  
onSagaMCGridRowDeselected(args: RowDeselectEventArgs) { 
//based on the target we can differentiate the header and row checkboxes 
         console.log('onSagaMCGridRowDeselected', args) 
      if (parentsUntil(args.target'e-headercell')){ 
      console.log('Headercheckox deselected'); 
    } 
    else { 
       console.log('Rowcheckox deselected'); 
    } 
} 
  
 
  
Regards, 
Manivel 



SJ Skorri Júlíusson April 14, 2020 09:33 AM UTC

Thank you for the answer, I will stay posted for the defect fix.


MS Manivel Sellamuthu Syncfusion Team April 15, 2020 05:52 AM UTC

Hi Skorri,  

Thanks for your update.  

We will update you once, we have included the fix. 

Please let us know if you need any further assistance.  

Regards,  
Manivel 



MS Manivel Sellamuthu Syncfusion Team May 14, 2020 08:48 AM UTC

Hi Skorri, 
  
We are glad to announce that our Essential Studio 2020 Volume 1 Service Pack1 release v18.1.52  is rolled out and is available for download under the following link. 
  
  
We have fixed the reported issue “isInteracted value in the rowDeselected event is incorrect” in our 18.1.46 release. So kindly upgrade to our latest version (18.1.52) or minimum of 18.1.46 version to resolve the reported issue. Please find the release notes regarding the same from below  
 
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
  
Regards, 
Manivel 


Loader.
Up arrow icon