Spread Silverlight Documentation
Setting Borders and Gridlines

You can set the color or line style of the border around the cells, columns, or rows. You can also specify the color and whether to show grid lines. Use the SetBorder method to set a border. The ShowGridLine and GridLineColor properties can be used to make changes to the horizontal and vertical grid lines in the control.

The following image displays a border around a cell range.

Using Code

The following example creates a border around a block of cells.

CS
Copy Code
GrapeCity.Windows.SpreadSheet.Data.CellRange r;
r = new GrapeCity.Windows.SpreadSheet.Data.CellRange(1, 1, 2, 2);           
gcSpreadSheet1.Sheets[0].SetBorder(r, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Colors.Blue), GrapeCity.Windows.SpreadSheet.Data.SetBorderOptions.All);
gcSpreadSheet1.Invalidate();
VB.NET
Copy Code
Dim r As New GrapeCity.Windows.SpreadSheet.Data.CellRange(2, 2, 2, 2)
GcSpreadSheet1.Sheets(0).SetBorder(r, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, New GrapeCity.Windows.SpreadSheet.Data.BorderLine(Colors.Blue), GrapeCity.Windows.SpreadSheet.Data.SetBorderOptions.All)
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options | Documentation Feedback