Spread Windows Forms 6.0 Product Documentation
SheetView Constructor(ISheetDataModel,NamedStyleCollection)
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class > SheetView Constructor : SheetView Constructor(ISheetDataModel,NamedStyleCollection)


dataModel
Data model
namedStyles
Named style

Glossary Item Box

Creates a sheet (SheetView object) according to a specified data model and named style.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal dataModel As ISheetDataModel, _
   ByVal namedStyles As NamedStyleCollection _
)
Visual Basic (Usage)Copy Code
Dim dataModel As ISheetDataModel
Dim namedStyles As NamedStyleCollection
 
Dim instance As New SheetView(dataModel, namedStyles)
C# 
public SheetView( 
   ISheetDataModel dataModel,
   NamedStyleCollection namedStyles
)

Parameters

dataModel
Data model
namedStyles
Named style

Example

This example creates a SheetView object, adds it to the collection of sheets, and applies it to the active sheet.
Visual BasicCopy Code
Dim dm As New FarPoint.Win.Spread.Model.DefaultSheetDataModel(4, 4)
Dim nsc As New FarPoint.Win.Spread.NamedStyleCollection()
Dim ns As New FarPoint.Win.Spread.NamedStyle()
nsc.Add(ns)
Dim sv As New FarPoint.Win.Spread.SheetView(dm, nsc)
FpSpread1.Sheets.Add(sv)
FpSpread1.ActiveSheet = sv
C#Copy Code
FarPoint.Win.Spread.Model.DefaultSheetDataModel dm = new FarPoint.Win.Spread.Model.DefaultSheetDataModel(4, 4);
FarPoint.Win.Spread.NamedStyleCollection nsc = new FarPoint.Win.Spread.NamedStyleCollection();
FarPoint.Win.Spread.NamedStyle ns = new FarPoint.Win.Spread.NamedStyle();
nsc.Add(ns);
FarPoint.Win.Spread.SheetView sv = new FarPoint.Win.Spread.SheetView(dm, nsc);
fpSpread1.Sheets.Add(sv);
fpSpread1.ActiveSheet = sv;

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.