Can't find what you're looking for?

Contact us or post in our forums and we'll help you find an answer.

How to disable the active cell border with WinForms

Issue:

When a cell is selected in Spread, it shows a solid focus rectangle around its borders. However, sometimes the developer wants to disable any special borders for the selected cell.

Spread’s documentation, mentions the FocusRenderer property of the Spread can be used to customize the focus indicator for the active cell. But by default, FocusRenderer property is of type FlatFocusIndicatorRenderer which does not contain a member to disable the active cell border.

Therefore, this article shows how to disable border for selected/active cell in Spread.

Resolution:

To meet the requirement, set the FocusRenderer property to an instance of ‘DefaultFocusIndicatorRenderer’ passing 0 in its constructor for 0 thickness, as follows:

fpSpread1.FocusRenderer = new DefaultFocusIndicatorRenderer(0);