Spread for ASP.NET 7.0 Product Documentation
DefaultSheetAxisModel Constructor(Int32,SheetAxisOrientation,ISheetAxisModel)
See Also  Example Support Options
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
Public Class mySheetAxisModel
Inherits FarPoint.Web.Spread.Model.DefaultSheetAxisModel

Dim size As Integer=180

Public Overrides Function GetSize(By Val index As Integer)As Integer
Return size
End Function

Public Overrides Sub SetSize(By Val index As Integer, By Val value As Integer)
value=size
End Sub

End Class

Private SubPage_Load(By Val sender As System.Object,By Val e As System.EventArgs)Handles MyBase.Load

If(Me.IsPostBack)Then Return

Dim isheet As New mySheetAxisModel()
Dim model As New FarPoint.Web.Spread.Model.DefaultSheetAxisModel(FpSpread1.ActiveSheetView.ColumnCount,FarPoint.Web.Spread.Model.SheetAxisOrientation.Horizontal,isheet)
FpSpread1.ActiveSheetView.ColumnAxisModel=model

End Sub
C#Copy Code
public class mySheetAxisModel:FarPoint.Web.Spread.Model.DefaultSheetAxisModel
{
private int i=180;
private bool b=false;

public override int GetSize(intindex)
{
returni;
}

public override void SetSize(intindex,intvalue)
{
i=value;
}
}

private void Page_Load(objectsender,System.EventArgse)
{
if(this.IsPostBack)return;

mySheetAxisModel isheet= new mySheetAxisModel();
FarPoint.Web.Spread.Model.DefaultSheetAxisModel model = new FarPoint.Web.Spread.Model.DefaultSheetAxisModel(FpSpread1.ActiveSheetView.ColumnCount,FarPoint.Web.Spread.Model.SheetAxisOrientation.Horizontal,isheet);
FpSpread1.ActiveSheetView.ColumnAxisModel=model;
}

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

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