How to style border around multiple selected cells

It looks like by default when you select multiple cells in a SfDataGrid, there is only one focused cell indicated by a border brush. 

I want to style a border around all of the selected cells instead of one focused cell when I drag to select in the SfDataGrid. This also includes selecting multiple cells from ctrl+left click in the SfDataGrid. I also need to clear the border of those cells, when I select a new group of cells in the SfDataGrid.

I looked at CellStyleSelector as an attempt. 


2 Replies

EN Eric Nguyen July 2, 2024 07:01 PM UTC

My understanding is that you can define a style trigger to check if a grid cell is selected for Windows DataGrid. I am looking for the Syncfusion equivalent. 



SG Santhosh Govindasamy Syncfusion Team July 3, 2024 07:57 AM UTC

Hi Eric Nguyen,

We have reviewed the reported scenario "Style a border around all of the selected cells when dragging to select cells in the DataGrid." We would like to inform you that due to cell navigation, we provide a focus facility for the current cell alone.


As per the provided information, it seems you like to add common border for the group of selected cells like Excel group cell selection. For your reference, please see the attached image. To assist you further, kindly confirm the requirement.


Thank you for your cooperation, and we look forward to your response.


Image:

 

 

 

 


Regards,
Santhosh.G



Loader.
Up arrow icon