FarPoint.Web.Spread 名前空間 > SheetView クラス : ColumnCount プロパティ |
'Declaration
Public Overridable Property ColumnCount As Integer
public virtual int ColumnCount {get; set;}
シートの行数を取得または設定するには、RowCountプロパティを使用します。
private void Page_Load(object sender, System.EventArgs e) { if (this.IsPostBack) return; FarPoint.Web.Spread.SheetView sv = FpSpread1.ActiveSheetView; sv.ColumnCount = 5; sv.PageSize = 8; sv.RowCount = 8; for (int i = 0; i <= 7; i++) { for (int j = 0; j <= 4; j++) { sv.SetValue(i, j, 100 + i); sv.SetColumnSortIndicator(j, FarPoint.Web.Spread.Model.SortIndicator.Descending); } } sv.AllowSort = true; } private void Button1_Click(object sender, System.EventArgs e) { FarPoint.Web.Spread.SheetView sv = FpSpread1.ActiveSheetView; ListBox1.Items.Add(Convert.ToString(sv.ColumnAxisModel.GetSortIndicator(0))); }
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If Me.IsPostBack Then Return Dim sv As FarPoint.Web.Spread.SheetView = FpSpread1.ActiveSheetView Dim i, j As Integer sv.ColumnCount = 5 sv.PageSize = 8 sv.RowCount = 8 For i = 0 To sv.RowCount - 1 For j = 0 To sv.ColumnCount sv.SetValue(i, j, 100 + i) sv.SetColumnSortIndicator(j, FarPoint.Web.Spread.Model.SortIndicator.Descending) Next j Next i sv.AllowSort = True End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim sv As FarPoint.Web.Spread.SheetView = FpSpread1.ActiveSheetView ListBox1.Items.Add(Convert.ToString(sv.ColumnAxisModel.GetSortIndicator(0))) End Sub