How to keep multiple rows selected while editing one row?

Hi,

When multiple rows are selected, clicking Edit button puts one row into Edit mode and clears the selection. I need to keep the rows selected while editing one row.


I managed to save the selected row indexes before entering into Edit mode and re-select them afterwards in OnActionComplete event for BeginEdit request. However this approach fails (wrong rows may be selected) when virtualization is enabled, because programmatic selection using the SelectRows method is not supported in virtual scrolling.

  1. Is there a way to keep multiple rows selected when starting to Edit one row?
  2. Are there any plans to implement a native support for programmatic selection using the SelectRows method in virtual scrolling?


Thanks & Kind regards


6 Replies 1 reply marked as answer

MS Monisha Saravanan Syncfusion Team August 26, 2022 01:32 PM UTC

Hi Yunus,


Greetings from Syncfusion support.


We have prepared an simple sample with virtualization and programmatic row selection. Kindly check the attached sample and video demonstration for additional information.


Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/BlazorApp1-1867233483.zip


Video: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Virtualization-issue1397276653.zip


If we misunderstood your query or if you have further queries then kindly share the below details to validate the issue further at our end.


  1. Share us Grid code snippet along with model class.
  2. Share us the video demonstration of the issue.
  3. If possible share us an simple issue reproduceable sample or reproduce the issue on the above mentioned sample.


The above-requested details will be helpful for us to validate the reported query at our end and provide the solution as early as possible.


Regards,

Monisha




YU Yunus August 30, 2022 11:05 AM UTC

Hi Monisha,

Thanks for the sample. This is exactly how I am doing it right now. For the first "Page Size" records it works well. But, if you can scroll down so that virtualization procedure loads new data and do the same things again, you'll see that wrong rows will be selected.


Kind regards



MS Monisha Saravanan Syncfusion Team August 31, 2022 12:13 PM UTC

Hi Yunus,


Thanks for the confirmation.


Currently we are checking the reported query at our end. We will update further details on or before 2 September 2022.


Until then we appreciate your patience.


Regards,

Monisha



MS Monisha Saravanan Syncfusion Team September 2, 2022 02:57 PM UTC

Hi Yunus,


Welcome.


Query: “if you can scroll down so that virtualization procedure loads new data and do the same things again, you'll see that wrong rows will be selected.”


We have checked your query and we suspect that you are facing issue when selecting an next set of records in virtualized Grid. If so we suggest you to achieve your requirement by using Persist Selection feature of DataGrid. We have prepared an video demo along with sample ad per your requirement. kindly refer the attached reference for additional information.


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


Video: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Virtualization-Video-1991258141.zip


Reference: https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.GridSelectionSettings.html#Syncfusion_Blazor_Grids_GridSelectionSettings_PersistSelection


If you face any difficulties then if possible kindly share us an video demo along with issue replicating sample. So that it would be very helpful for us to validate the reported issue further at our end.


Regards,

Monisha


If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.



Marked as answer

YU Yunus September 5, 2022 09:14 AM UTC

Hi Monisha,

This setting solved my problem. Thank you very much.


Regards



MS Monisha Saravanan Syncfusion Team September 6, 2022 04:29 AM UTC

Hi Yunus,


Welcome.


We are glad to hear that the reported query has been resolved. Kindly get back to us if you have further queries. As always we will be happy to help you.


Regards,

Monisha


Loader.
Up arrow icon