Posted 17 April 2023, 11:33 pm EST
- Updated 17 April 2023, 11:38 pm EST
Hi Daniel,
Due to the CSS Conflict with the border of the other cells, only the top and left borders are shown for some cells. You could simply add a z-index to the SelectionStyle and it will resolve the issue.
<FlexGrid @ref="_grid" ItemsSource="forecasts" SelectionMode="GridSelectionMode.Cell" CellFactory="cf"
Style="@("border: 1px solid black;")"
SelectionStyle="@("background-color: yellow; border: 1px solid black; z-index: 9999")"
SelectionChanged="OnSelectionChanged"
GridLinesVisibility="GridLinesVisibility.All">
</FlexGrid>
Similarly, if you apply a border to the FlexGrid, you could handle the cases when the active cell is the corner cell and set the border-top/border-left/border-bottom width to 0px inside the PrepareCellStyle Property.
Lastly, for Keyboard-based Cell Selection, you could use the SelectionChanged Event instead of the CellTapped Event.
Kindly refer to the attached sample and let us know if you face any problems.
Regards,
Ankit
Sample: FlexGrid_RowSelection.zip
