Spread Windows Forms 6.0 Product Documentation
DefaultSheetStyleModel Constructor(Int32,Int32,ISheetStyleModel)
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.Model Namespace > DefaultSheetStyleModel Class > DefaultSheetStyleModel Constructor : DefaultSheetStyleModel Constructor(Int32,Int32,ISheetStyleModel)


rowCount
Number of rows in the model
columnCount
Number of columns in the model
parent
Parent style model

Glossary Item Box

Creates a style model (DefaultSheetStyle model object) with the specified parent style model and number of rows and columns.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal rowCount As Integer, _
   ByVal columnCount As Integer, _
   ByVal parent As ISheetStyleModel _
)
Visual Basic (Usage)Copy Code
Dim rowCount As Integer
Dim columnCount As Integer
Dim parent As ISheetStyleModel
 
Dim instance As New DefaultSheetStyleModel(rowCount, columnCount, parent)
C# 
public DefaultSheetStyleModel( 
   int rowCount,
   int columnCount,
   ISheetStyleModel parent
)

Parameters

rowCount
Number of rows in the model
columnCount
Number of columns in the model
parent
Parent style model

Example

This example assigns the style model to the style of the active sheet and changes the background color of the second alternating rows collection.
C#Copy Code
FarPoint.Win.Spread.Model.ISheetStyleModel iStyle; 
FarPoint.Win.Spread.StyleInfo sInfo = new FarPoint.Win.Spread.StyleInfo(); 
FarPoint.Win.Spread.NamedStyleCollection nsc = new
FarPoint.Win.Spread.NamedStyleCollection(); 
FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle(); 
ns.Border = new
FarPoint.Win.BevelBorder(FarPoint.Win.BevelBorderType.Raised,
Color.DarkBlue, Color.LightBlue, 2); 
nsc.Add(ns); 
sInfo.BackColor = Color.LightBlue; 
iStyle = fpSpread1.ActiveSheet.Models.Style; 
iStyle.SetDirectAltRowInfo(0, sInfo); 
FarPoint.Win.Spread.Model.DefaultSheetStyleModel defstyleModel = new
FarPoint.Win.Spread.Model.DefaultSheetStyleModel(10, 10, iStyle); 
fpSpread2.ActiveSheet.Models.Style = defstyleModel; 
Visual BasicCopy Code
Dim iStyle As FarPoint.Win.Spread.Model.ISheetStyleModel
Dim sInfo As New FarPoint.Win.Spread.StyleInfo()
Dim nsc As New FarPoint.Win.Spread.NamedStyleCollection()
Dim ns As New FarPoint.Win.Spread.NamedStyle()
ns.Border = New
FarPoint.Win.BevelBorder(FarPoint.Win.BevelBorderType.Raised,
Color.DarkBlue, Color.LightBlue, 2)
nsc.Add(ns)
sInfo.BackColor = Color.LightBlue
iStyle = FpSpread1.ActiveSheet.Models.Style
iStyle.SetDirectAltRowInfo(0, sInfo)
Dim defstyleModel As New
FarPoint.Win.Spread.Model.DefaultSheetStyleModel(10, 10, iStyle)
FpSpread2.ActiveSheet.Models.Style = defstyleModel

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

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