You can display grid lines on the sheet that distinguish rows or columns (or both). You can set the grid lines to display using the GridLines property for the sheet (which uses the settings of the GridLines enumeration in the underlying Microsoft .NET framework).
You can set the color of the grid lines. In the following figure, where both the horizontal and vertical lines are displayed, the grid lines are red.
You can also set the grid lines and the grid lines color by defining these properties in the SheetSkin class and then applying the skin to the sheet. For more information creating and applying skins, refer to Applying a Skin to a Sheet and Creating a Skin for Sheets.
To set borders around individual cells, refer to Customizing Cell Borders.
Set the GridLines and GridLineColor properties of the FpSpread component Sheets shortcut.
This example code sets the grid line color to red and displays the row grid lines.
C# |
Copy Code
|
---|---|
// Set the grid line color to red.
FpSpread1.Sheets[0].GridLineColor = System.Drawing.Color.Red;
FpSpread1.Sheets[0].GridLines = GridLines.Horizontal;
|
VB |
Copy Code
|
---|---|
' Set the grid line color to red.
FpSpread1.Sheets(0).GridLineColor = System.Drawing.Color.Red
FpSpread1.Sheets(0).GridLines = GridLines.Horizontal
|