Gets or sets the parent sheet axis model.
Syntax
Example
This example creates a new DefaultSheetAxisModel based on an overridden one and assigns it to the spreadsheets ColumnAxisModel.
Visual Basic | Copy 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);
model.Parent=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