Spread for ASP.NET 9.0 Product Documentation
LayoutColumnAxisModel Property
Example 


Gets or sets the column information for the layout template.
Syntax
'Declaration
 
Public Property LayoutColumnAxisModel As ISheetAxisModel
'Usage
 
Dim instance As WorksheetTemplate
Dim value As ISheetAxisModel
 
instance.LayoutColumnAxisModel = value
 
value = instance.LayoutColumnAxisModel
public ISheetAxisModel LayoutColumnAxisModel {get; set;}
Example
This example sets the LayoutColumnAxisModel property.
protected void Page_Load(object sender, EventArgs e)
        {
            if (this.IsPostBack) return;
            FarPoint.Web.Spread.Model.DefaultSheetAxisModel parent = new FarPoint.Web.Spread.Model.DefaultSheetAxisModel(10, FarPoint.Web.Spread.Model.SheetAxisOrientation.Horizontal);
            FarPoint.Web.Spread.Model.DefaultSheetAxisModel child = new FarPoint.Web.Spread.Model.DefaultSheetAxisModel(10, FarPoint.Web.Spread.Model.SheetAxisOrientation.Horizontal, parent);
            parent.SetSize(0, 50);
            child.SetSize(-1, 10);
            FpSpread1.ActiveSheetView.ColumnAxisModel = child;

            FpSpread1.ActiveSheetView.LayoutMode = FarPoint.Web.Spread.SheetView.LayoutModeType.RowTemplateLayoutMode;
            FarPoint.Web.Spread.WorksheetTemplate template1;
            template1 = FpSpread1.Sheets[0].WorksheetTemplate;
            template1.ColumnCount = 3;
            template1.ColumnHeaderTemplate.RowCount = 2;
            template1.RowTemplate.RowCount = 2;
            template1.LayoutColumns[1].Width = 250;
            //Set row template's layout 
            template1.RowTemplate.LayoutCells[1, 1].ColumnSpan = 2;
            //set column header template's layout
            template1.ColumnHeaderTemplate.LayoutCells[0, 0].RowSpan = 2;
            template1.ColumnHeaderTemplate.LayoutCells[1, 1].ColumnSpan = 2;
            template1.LayoutColumnAxisModel = parent;           
        }
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load, Me.Load
            If (IsPostBack) Then
                Return
            End If
            Dim parent As New FarPoint.Web.Spread.Model.DefaultSheetAxisModel(10, FarPoint.Web.Spread.Model.SheetAxisOrientation.Horizontal)
            Dim child As New FarPoint.Web.Spread.Model.DefaultSheetAxisModel(10, FarPoint.Web.Spread.Model.SheetAxisOrientation.Horizontal, parent)
            parent.SetSize(0, 50)
            child.SetSize(-1, 10)
            FpSpread1.ActiveSheetView.ColumnAxisModel = child

            FpSpread1.ActiveSheetView.LayoutMode = FarPoint.Web.Spread.SheetView.LayoutModeType.RowTemplateLayoutMode
            Dim template1 As FarPoint.Web.Spread.WorksheetTemplate
            template1 = FpSpread1.Sheets(0).WorksheetTemplate
            template1.ColumnCount = 3
            template1.ColumnHeaderTemplate.RowCount = 2
            template1.RowTemplate.RowCount = 2
            template1.LayoutColumns(1).Width = 250
            'Set row template's layout 
            template1.RowTemplate.LayoutCells(1, 1).ColumnSpan = 2
            'set column header template's layout
            template1.ColumnHeaderTemplate.LayoutCells(0, 0).RowSpan = 2
            template1.ColumnHeaderTemplate.LayoutCells(1, 1).ColumnSpan = 2
            template1.LayoutColumnAxisModel = parent
        End Sub
Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

WorksheetTemplate Class
WorksheetTemplate Members

 

 


Copyright © GrapeCity, inc. All rights reserved.