PowerTools SPREAD for ASP.NET 8.0J
DefaultSheetAxisModel コンストラクタ(Int32,SheetAxisOrientation,ISheetAxisModel)

モデル内の行または列の数
モデルの向き
親ISheetAxisModel
親モデルと行または列の数を指定して軸モデル(DefaultSheetAxisModelオブジェクト)を作成します。
構文
'Declaration
 
Public Function New( _
   ByVal count As Integer, _
   ByVal orientation As SheetAxisOrientation, _
   ByVal parent As ISheetAxisModel _
)
public DefaultSheetAxisModel( 
   int count,
   SheetAxisOrientation orientation,
   ISheetAxisModel parent
)

パラメータ

count
モデル内の行または列の数
orientation
モデルの向き
parent
親ISheetAxisModel
この例では、DefaultSheetAxisModelに基づいてカスタム軸モデルを作成します。
Public Class mySheetAxisModel
	Inherits FarPoint.Web.Spread.Model.DefaultSheetAxisModel

	Dim size As Integer = 180

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

	Public Overrides Sub SetSize(ByVal index As Integer, ByVal value As Integer)
		value = size
	End Sub
End Class

Private Sub Page_Load(ByVal sender As System.Object, ByVal 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
public class mySheetAxisModel : FarPoint.Web.Spread.Model.DefaultSheetAxisModel
{
	private int i = 180;

	public override int GetSize(int index)
	{
		return i;
	}

	public override void SetSize(int index, int value)
	{
		i = value;
	}
}

private void Page_Load(object sender, System.EventArgs e)
{
	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;
}
参照

DefaultSheetAxisModel クラス
DefaultSheetAxisModel メンバ
オーバーロード一覧

 

 


© 2003-2015, GrapeCity inc. All rights reserved.