rowselected event is not working when I am selecting all transactons

Hi

I am using Grid with rowSelected and rowDeselected events.

My selection mode is checkBox



When I am selecting all Transaction together then rowSelected event is not working. Although I am getting that this event is meant to be only for one row then can you please suggest some other event.

Namita

3 Replies 1 reply marked as answer

AG Ajith Govarthan Syncfusion Team June 8, 2021 11:29 AM UTC

Hi Namita, 
  
Thanks for contacting Syncfusion support. 
  
Query: When I am selecting all Transaction together then rowSelected event is not working. Although I am getting that this event is meant to be only for one row then can you please suggest some other event. 
  
Based on your query you are facing rowSelected event issue when selecting all the rows with header checkbox. So, we have prepared sample and found that everything works fine at our end without any mentioned issues. For your convenience we have attached the sample, please refer them for your reference. 
  
Code Example: 
App.component.html 
  
<div class="control-section"> 
  <ejs-grid [dataSource]='data' allowPaging='true' (rowSelected)="rowSelected($event)" 
    (rowDeselected)="rowDeselected($event)" [enableHover]="false" [allowSelection]="true" 
    [selectionSettings]="selectOptions" [editSettings]='editSettings' [toolbar]='toolbar'> 
    <e-columns> 
      <e-column type='checkbox' width='50'></e-column> 
      <e-column field='OrderID' isPrimaryKey='true' headerText='Order ID' width='120' textAlign='Right'></e-column> 
      <e-column field='CustomerName' headerText='Customer Name' width='150'></e-column> 
      <e-column field='OrderDate' headerText='Order Date' width='130' format="yMd" textAlign='Right'></e-column> 
      <e-column field='Freight' headerText='Freight' width='120' format='C2' textAlign='Right'></e-column> 
      <e-column field='ShippedDate' headerText='Shipped Date' width='130' format="yMd" textAlign='Right'></e-column> 
    </e-columns> 
  </ejs-grid> 
</div> 
  
  
App.component.ts 
  
rowSelected(args) { 
    console.log(args); 
  } 
  rowDeselected(args) { 
    console.log(args); 
  } 
  
  
If you still face the issue, then please try to reproduce the issue in the attached sample to find the root cause of the issue. 
  
Please get back to us if you need further assistance. 
  
Regards, 
Ajith G. 


Marked as answer

NA Namita June 9, 2021 01:38 AM UTC

Thank you so much, there was some mistake in my code.

Now it is working.

Please close this ticket.


AG Ajith Govarthan Syncfusion Team June 9, 2021 03:22 PM UTC

Hi Namita, 
  
Thanks for the update. 
  
We are happy to hear that your issue has been resolved. 
  
Please get back to us if you need further assistance. 
  
Regards, 
Ajith G. 


Loader.
Up arrow icon