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


Glossary Item Box

Gets the number of columns in the style model.

Syntax

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

Property Value

Integer number of columns

Example

This example creates a new StyleInfo object and sets the StyleInfo to cell A1. The value of the IsEmpty method is returned to a list box.
C#Copy Code
PrivatevoidPage_Load(objectsender,System.EventArgse)
{
If(this.IsPostBack)Return;

FarPoint.Web.Spread.Model.DefaultSheetStyleModelmodel=(FarPoint.Web.Spread.Model.DefaultSheetStyleModel)FpSpread1.Sheets[0].StyleModel;
FarPoint.Web.Spread.StyleInfostyle=NewFarPoint.Web.Spread.StyleInfo();
style.BackColor=Color.Yellow;

model.SetDirectInfo(0,0,style);
boolb=model.IsEmpty();
ListBox1.Items.Add(b.ToString());
ListBox1.Items.Add(model.ColumnCount.ToString());
ListBox1.Items.Add(model.RowCount.ToString());
}
Visual BasicCopy Code
PrivateSubPage_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load
If(IsPostBack)ThenReturn

DimmodelAsFarPoint.Web.Spread.Model.DefaultSheetStyleModel=FpSpread1.Sheets(0).StyleModel
DimstyleAsNewFarPoint.Web.Spread.StyleInfo()
style.BackColor=Color.Yellow

model.SetDirectInfo(0,0,style)
DimbAsBoolean=model.IsEmpty()
ListBox1.Items.Add(b.ToString())
ListBox1.Items.Add(model.ColumnCount.ToString())
ListBox1.Items.Add(model.RowCount.ToString())

EndSub

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.