Working with FlexGrid > Selection > Selection and Selection Modes > Customizing the Selection Display |
The C1FlexGrid includes two features that allow you to customize the way in which the selection is highlighted for the user.
If you set the ShowMarquee property to true, the grid automatically draws a rectangle around the selection, making it extremely easy to see. By default, the marquee is a two-pixel thick black rectangle, but you can customize it using the Marquee property.
If you assign custom brush objects to the grid’s ColumnHeaderSelectedBackground and RowHeaderSelectedBackground properties, the grid highlights the headers that correspond to selected cells, making it easy for users to see which rows and columns contain the selection.
Together, these properties let you implement grids that have the familiar Excel look and feel. The image below shows an example:
The C1FlexGrid designer has a context menu with options that allow you to select Excel-like preconfigured color schemes (Blue, Silver, Black). You can easily copy the XAML generated by the designer into reusable style resources.