This sample shows a way to define custom borders in a ComponentOne C1FlexGrid (https://www.grapecity.com/componentone/winforms-ui-controls)
This sample targets .NET6. A detailed documentation can be found in the .NET 4.8 sample at C1FlexGrid48BorderPainter