Selectet records by SHIFT when enable virtualization

Hi,

I have problem with selected records by SHIFT when enable virtualization.

When raise event (rowSelected) I have undefind items in object row



When virtualization is disabled I don't have this problem

Regards



5 Replies 1 reply marked as answer

VS Vignesh Sivagnanam Syncfusion Team May 3, 2021 12:34 PM UTC

Hi Kamil 

Greetings from Syncfusion support 

Based on your query we found that the rows are undefined in the rowSelected event while using virtualization. We have prepared a sample by enabling the virtualization and select the rows using shift.  

By default, while using virtualization only the rows rendered in the DOM element are included in the row object in args of the rowSelected event. It is the default behavior of EJ2 Grid. In your attached screenshot we found that you have all rows as undefined in your project, but we are unable to reproduce the mentioned issue in our sample. 

Please refer the below Sample for your reference, 


Please share the below details to validate the issue at our end and provide solution as soon as possible, 

1. Share the issue reproduced sample or replicate the issue in the above sample  

2. Share full grid code example 

3. Syncfusion package version. 

Regards 
Vignesh Sivagnanam 


Marked as answer

KK Kamil Krzyzanski May 11, 2021 07:27 AM UTC

Thank you for response. Your sample helped me to improve all rows as undefined.

Does Object rowIndexes have all selected items when enable virtualization?

Regards


VS Vignesh Sivagnanam Syncfusion Team May 12, 2021 10:33 AM UTC

Hi Kamil 
  
Thanks for the update, 
  
Yes, the rowIndexes in the arguments will have every row index that you have selected using shift key with the virtualization in the grid.  
  
 
Regards 
Vignesh Sivagnanam 



KK Kamil Krzyzanski May 18, 2021 06:32 AM UTC

Is it possibles to get data rows by row indexes from rowIndexes object?
I need all selected data when enable Virtualization.

Regards


VS Vignesh Sivagnanam Syncfusion Team May 18, 2021 11:48 AM UTC

Hi Kamil 
  
Thanks for the update 
  
Based on your requirement you need to get the row data of the selected records using the rowIndexes. By default, in EJ2 Grid we will not maintain the selection while navigating to the next page in the grid. 
  
In virtualization Grid when we select the records using shift button, we select the records only from the start to end range which is available in the current DOM element.  
  
Please refer the video demonstration for more information, 
  
  
You can get row data only in the current DOM element using some methods like currentViewData, getSelectedRecords etc., in the grid. 
  
Please get back to us for further assistance 
  
Regards 
Vignesh Sivagnanam 


Loader.
Up arrow icon