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


Glossary Item Box

Gets or sets the cell types and other style settings for the sheet.

Syntax

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

Property Value

ISheetStyleModel object containing the cell types and other style settings

Remarks

This property is available at run time only.

Example

The following example creates a sheet with 1000 rows and 7 columns. Alternate rows display a light cyan backcolor, and navy blue, bold text. The fifth row (0 index) is the starting row in the sheet.
C#Copy Code
FarPoint.Web.Spread.SheetViewsv=FpSpread1.ActiveSheetView;
FarPoint.Web.Spread.StyleInfoaltrowstyle=newFarPoint.Web.Spread.StyleInfo();
FarPoint.Web.Spread.Model.DefaultSheetStyleModelaltrowmodel=newFarPoint.Web.Spread.Model.DefaultSheetStyleModel(1000,7);
sv.ColumnCount=7;
sv.RowCount=1000;
altrowstyle.BackColor=Color.LightCyan;
altrowstyle.ForeColor=Color.Navy;
altrowstyle.Font.Bold=true;
altrowmodel.SetDirectAltRowInfo(1,altrowstyle);
sv.StyleModel=altrowmodel;
sv.TopRow=4;
Visual BasicCopy Code
DimsvAsFarPoint.Web.Spread.SheetView
DimaltrowstyleAsNewFarPoint.Web.Spread.StyleInfo()
DimaltrowmodelAsNewFarPoint.Web.Spread.Model.DefaultSheetStyleModel(1000,7)
sv=FpSpread1.ActiveSheetView
sv.ColumnCount=7
sv.RowCount=1000
altrowstyle.BackColor=Color.LightCyan
altrowstyle.ForeColor=Color.Navy
altrowstyle.Font.Bold=True
altrowmodel.SetDirectAltRowInfo(1,altrowstyle)
sv.StyleModel=altrowmodel
sv.TopRow=4

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.