Spread ASP.NET 6.0 Product Documentation
DefaultSheetAxisModel Constructor(Int32,SheetAxisOrientation,ISheetAxisModel)
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > DefaultSheetAxisModel Class > DefaultSheetAxisModel Constructor : DefaultSheetAxisModel Constructor(Int32,SheetAxisOrientation,ISheetAxisModel)


count
Number of rows or columns in the model
orientation
Model orientation
parent
Parent ISheetAxisModel

Glossary Item Box

Creates an axis model (DefaultSheetAxisModel object) with the specified parent model and number of rows or columns.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal count As Integer, _
   ByVal orientation As SheetAxisOrientation, _
   ByVal parent As ISheetAxisModel _
)
Visual Basic (Usage)Copy Code
Dim count As Integer
Dim orientation As SheetAxisOrientation
Dim parent As ISheetAxisModel
 
Dim instance As New DefaultSheetAxisModel(count, orientation, parent)
C# 
public DefaultSheetAxisModel( 
   int count,
   SheetAxisOrientation orientation,
   ISheetAxisModel parent
)

Parameters

count
Number of rows or columns in the model
orientation
Model orientation
parent
Parent ISheetAxisModel

Example

This example creates a custom axis model based on the DefaultSheetAxisModel.
Visual BasicCopy Code
PublicClassmySheetAxisModel
InheritsFarPoint.Web.Spread.Model.DefaultSheetAxisModel

DimsizeAsInteger=180

PublicOverridesFunctionGetSize(ByValindexAsInteger)AsInteger
Returnsize
EndFunction

PublicOverridesSubSetSize(ByValindexAsInteger,ByValvalueAsInteger)
value=size
EndSub

EndClass

PrivateSubPage_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load

If(Me.IsPostBack)ThenReturn

DimisheetAsNewmySheetAxisModel()
DimmodelAsNewFarPoint.Web.Spread.Model.DefaultSheetAxisModel(FpSpread1.ActiveSheetView.ColumnCount,FarPoint.Web.Spread.Model.SheetAxisOrientation.Horizontal,isheet)
FpSpread1.ActiveSheetView.ColumnAxisModel=model

EndSub
C#Copy Code
publicclassmySheetAxisModel:FarPoint.Web.Spread.Model.DefaultSheetAxisModel
{
privateinti=180;
privateboolb=false;

publicoverrideintGetSize(intindex)
{
returni;
}

publicoverridevoidSetSize(intindex,intvalue)
{
i=value;
}
}

privatevoidPage_Load(objectsender,System.EventArgse)
{
if(this.IsPostBack)return;

mySheetAxisModelisheet=newmySheetAxisModel();
FarPoint.Web.Spread.Model.DefaultSheetAxisModelmodel=newFarPoint.Web.Spread.Model.DefaultSheetAxisModel(FpSpread1.ActiveSheetView.ColumnCount,FarPoint.Web.Spread.Model.SheetAxisOrientation.Horizontal,isheet);
FpSpread1.ActiveSheetView.ColumnAxisModel=model;
}

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.