Spread ASP.NET 6.0 Product Documentation
ColumnCount Property
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetCorner Class : ColumnCount Property


Glossary Item Box

Gets or sets the number of columns in the sheet corner.

Syntax

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

Property Value

Integer number of columns in the sheet corner

Exceptions

ExceptionDescription
System.ArgumentOutOfRangeException Specified column count is less than 0 or greater than 256.

Example

This example modifies the appearance of the sheet corner.
C#Copy Code
FarPoint.Web.Spread.Background bg = new FarPoint.Web.Spread.Background();
bg.SelectedBackgroundImageUrl = "picture/Winter.jpg";
bg.BackgroundImageUrl = "picture/Image.bmp";
FpSpread1.SheetCorner.AlternatingRows.Count = 2;
FpSpread1.SheetCorner.AlternatingRows[0].BackColor = Color.Pink;
FpSpread1.SheetCorner.Cells[0, 0].Text = "Corner";
FpSpread1.SheetCorner.ColumnCount = 3;
FpSpread1.SheetCorner.RowCount = 3;
FpSpread1.SheetCorner.Columns[1].CellType = new FarPoint.Web.Spread.CheckBoxCellType();
FpSpread1.SheetCorner.Rows[1].Background = bg;
// Define the default style name.
FarPoint.Web.Spread.NamedStyle mnstyle = new FarPoint.Web.Spread.NamedStyle();
mnstyle.Name = "fpstyle";
mnstyle.BackColor = Color.Yellow;
FpSpread1.NamedStyles.Add(mnstyle);
FpSpread1.SheetCorner.DefaultStyleName = mnstyle.Name;
// Define the default style.
FarPoint.Web.Spread.StyleInfo mystyle = new FarPoint.Web.Spread.StyleInfo();
mystyle.BackColor = Color.Red;
FpSpread1.SheetCorner.DefaultStyle = mystyle;
Visual BasicCopy Code
Dim bg As New FarPoint.Web.Spread.Background()
bg.SelectedBackgroundImageUrl = "picture/Winter.jpg"
bg.BackgroundImageUrl = "picture/Image.bmp"
FpSpread1.SheetCorner.AlternatingRows.Count = 2
FpSpread1.SheetCorner.AlternatingRows(0).BackColor = Color.Pink
FpSpread1.SheetCorner.Cells(0, 0).Text = "Corner"
FpSpread1.SheetCorner.ColumnCount = 3
FpSpread1.SheetCorner.RowCount = 3
FpSpread1.SheetCorner.Columns(1).CellType = New FarPoint.Web.Spread.CheckBoxCellType()
FpSpread1.SheetCorner.Rows(1).Background = bg
' Define the default style name.
Dim mnstyle As New FarPoint.Web.Spread.NamedStyle()
mnstyle.Name = "fpstyle"
mnstyle.BackColor = Color.Yellow
FpSpread1.NamedStyles.Add(mnstyle)
FpSpread1.SheetCorner.DefaultStyleName = mnstyle.Name
' Define the default style.
Dim mystyle As New FarPoint.Web.Spread.StyleInfo()
mystyle.BackColor = Color.Red
FpSpread1.SheetCorner.DefaultStyle = mystyle

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.