Spread ASP.NET 6.0 Product Documentation
Parent Property
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > DefaultSheetAxisModel Class : Parent Property


Glossary Item Box

Gets or sets the parent sheet axis model.

Syntax

Visual Basic (Declaration) 
Public Property Parent As ISheetAxisModel
Visual Basic (Usage)Copy Code
Dim instance As DefaultSheetAxisModel
Dim value As ISheetAxisModel
 
instance.Parent = value
 
value = instance.Parent
C# 
public ISheetAxisModel Parent {get; set;}

Property Value

ISheetAxisModel object with the parent sheet axis model

Example

This example creates a new DefaultSheetAxisModel based on an overridden one and assigns it to the spreadsheets ColumnAxisModel.
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);
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

© 2002-2012 GrapeCity, Inc. All Rights Reserved.