Version

Enabling Selection Overlay for Selected Cells

In Microsoft® Excel®, a rectangular selection area is overlaid on selected cells and this overlay provides a color-washed appearance for the underlying cells. The same effect can be achieved for the WinGrid™ control by using the SelectionOverlayColor and SelectionOverlayBorderColor properties of the UltraGridLayout object.

Note
Note

The Border for selection overlay will be drawn only when you perform a single, contiguous rectangular region of selection. For example, if you select two set of columns that aren’t next to each other, the borders will not be drawn. Similarly, different cell selection ranges, or row selection ranges also will not have borders, similar to how Excel® behaves.

In Visual Basic:

Me.ultraGrid1.DisplayLayout.SelectionOverlayColor = Color.DarkBlue
Me.ultraGrid1.DisplayLayout.SelectionOverlayBorderColor = Color.Magenta

In C#:

this.ultraGrid1.DisplayLayout.SelectionOverlayColor = Color.DarkBlue;
this.ultraGrid1.DisplayLayout.SelectionOverlayBorderColor = Color.Magenta;

WinGrid showing a Rectangular selection area with a blue color-washed appearance and a Magenta border.

WinGrid Enable Selection Overlay for Selected Cells 01.png