Spread for ASP.NET 7.0 Product Documentation
ColumnAxisModel Property
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetView Class : ColumnAxisModel Property


Glossary Item Box

Gets or sets the column information for the sheet.

Syntax

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

Property Value

ISheetAxisModel object containing the column information for the sheet

Remarks

This property is available at run time only.

Example

This example places values in all the cells and, in a button click event, returns the type of sort indicator used in the first column in a sheet with only five columns and eight rows.
C#Copy Code
private void Page_Load(object sender, System.EventArgs e)
{
      if (this.IsPostBack) return;

      FarPoint.Web.Spread.SheetView sv = FpSpread1.ActiveSheetView;
      int i, j;
      sv.ColumnCount = 5;
      sv.PageSize = 8;
      sv.RowCount = 8;
      for (i = 0;  i <= 7; i++)
      {
           for (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)));
}
Visual BasicCopy Code
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

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.