Spread for ASP.NET 7.0 Product Documentation
CellSpacing Property
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetView Class : CellSpacing Property


Glossary Item Box

Gets or sets the cell spacing to use in the displayed HTML page.

Syntax

Visual Basic (Declaration) 
Public Property CellSpacing As Integer
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim value As Integer
 
instance.CellSpacing = value
 
value = instance.CellSpacing
C# 
public int CellSpacing {get; set;}

Property Value

Integer number of pixels for table cell spacing

Remarks

This property sets the distance between the cells on all four sides of the cell.

HTML tables that represent the displayed sheet can specify a spacing for the cells in the table using the CELLSPACING attribute of the TABLE tag. The cell spacing specifies how much space there is between table cells.

To set the cell padding, which is the spacing between borders and contents of a cell, refer to the Margin property for the Cell.

Example

This example assigns a SheetView object to the active sheet and creates a Border object. The border is then applied to all the cells in the sheet, and the cells spacing is increased to 5.
C#Copy Code
FarPoint.Web.Spread.SheetView sv = FpSpread1.ActiveSheetView;
FarPoint.Web.Spread.Border bord = new FarPoint.Web.Spread.Border(BorderStyle.Dotted, Color.Teal, 2);
int i, j;
for (i = 0; i <= 2; i++)
{
     for (j = 0; j <= 3; j++)
          sv.Cells[i, j].Border = bord;
}
sv.CellSpacing = 5;
Visual BasicCopy Code
Dim sv As FarPoint.Web.Spread.SheetView
Dim bord As New FarPoint.Web.Spread.Border(BorderStyle.Dotted, Color.Teal, 2)
Dim i, j As Integer
sv = FpSpread1.ActiveSheetView
For i = 0 To 2
      For j = 0 To 3
            sv.Cells(i, j).Border = bord
      Next j
Next i
sv.CellSpacing = 5

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.