Spread Windows Forms 10.0 Product Documentation
CellSpanSelectionPolicy Enumeration
Example Example 


Sets the type of selection model when working with spans.
Syntax
'Declaration
 
Public Enum CellSpanSelectionPolicy 
   Inherits System.Enum
'Usage
 
Dim instance As CellSpanSelectionPolicy
public enum CellSpanSelectionPolicy : System.Enum 
Members
MemberDescription
ContainedSpecifies that the selection is contained in the range.
DefaultSpecifies the default behavior for the selection.
IgnoreSpanSpecifies that the selection will ignore the spanned cell
IntersectedSpecifies that the selection contains all ranges that intersect with the selected range.
Example
This example uses the CellSpanSelectionPolicy enumeration.
fpSpread1.CellSpanSelectionPolicy = FarPoint.Win.Spread.CellSpanSelectionPolicy.Intersected;
fpSpread1.ActiveSheet.ColumnHeader.RowCount = 3;
// Set the number of columns in the row header.
fpSpread1.ActiveSheet.RowHeader.ColumnCount = 2;
// Define the labels for the spanned column header cells.
fpSpread1.ActiveSheet.ColumnHeader.Cells[2, 0].Text = "East";
fpSpread1.ActiveSheet.ColumnHeader.Cells[2, 1].Text = "West";
fpSpread1.ActiveSheet.ColumnHeader.Cells[2, 2].Text = "East";
fpSpread1.ActiveSheet.ColumnHeader.Cells[2, 3].Text = "West";
fpSpread1.ActiveSheet.ColumnHeader.Cells[2, 4].Text = "East";
fpSpread1.ActiveSheet.ColumnHeader.Cells[2, 5].Text = "West";
fpSpread1.ActiveSheet.ColumnHeader.Cells[2, 6].Text = "East";
fpSpread1.ActiveSheet.ColumnHeader.Cells[2, 7].Text = "West";
fpSpread1.ActiveSheet.ColumnHeader.Cells[1, 0].Text = "1st Quarter";
fpSpread1.ActiveSheet.ColumnHeader.Cells[1, 2].Text = "2nd Quarter";
fpSpread1.ActiveSheet.ColumnHeader.Cells[1, 4].Text = "3rd Quarter";
fpSpread1.ActiveSheet.ColumnHeader.Cells[1, 6].Text = "4th Quarter";
fpSpread1.ActiveSheet.ColumnHeader.Cells[0, 0].Text = "Fiscal Year 2004";
// Define the column header cell spans.
fpSpread1.ActiveSheet.AddColumnHeaderSpanCell(1, 0, 1, 2);
fpSpread1.ActiveSheet.AddColumnHeaderSpanCell(1, 2, 1, 2);
fpSpread1.ActiveSheet.AddColumnHeaderSpanCell(1, 4, 1, 2);
fpSpread1.ActiveSheet.AddColumnHeaderSpanCell(1, 6, 1, 2);
fpSpread1.ActiveSheet.AddColumnHeaderSpanCell(0, 0, 1, 8);
FpSpread1.CellSpanSelectionPolicy = FarPoint.Win.Spread.CellSpanSelectionPolicy.Intersected
FpSpread1.ActiveSheet.ColumnHeader.RowCount = 3
' Set the number of columns in the row header.
FpSpread1.ActiveSheet.RowHeader.ColumnCount = 2
' Define the labels for the spanned column header cells.
FpSpread1.ActiveSheet.ColumnHeader.Cells(2, 0).Text = "East"
FpSpread1.ActiveSheet.ColumnHeader.Cells(2, 1).Text = "West"
FpSpread1.ActiveSheet.ColumnHeader.Cells(2, 2).Text = "East"
FpSpread1.ActiveSheet.ColumnHeader.Cells(2, 3).Text = "West"
FpSpread1.ActiveSheet.ColumnHeader.Cells(2, 4).Text = "East"
FpSpread1.ActiveSheet.ColumnHeader.Cells(2, 5).Text = "West"
FpSpread1.ActiveSheet.ColumnHeader.Cells(2, 6).Text = "East"
FpSpread1.ActiveSheet.ColumnHeader.Cells(2, 7).Text = "West"
FpSpread1.ActiveSheet.ColumnHeader.Cells(1, 0).Text = "1st Quarter"
FpSpread1.ActiveSheet.ColumnHeader.Cells(1, 2).Text = "2nd Quarter"
FpSpread1.ActiveSheet.ColumnHeader.Cells(1, 4).Text = "3rd Quarter"
FpSpread1.ActiveSheet.ColumnHeader.Cells(1, 6).Text = "4th Quarter"
FpSpread1.ActiveSheet.ColumnHeader.Cells(0, 0).Text = "Fiscal Year 2004"
' Define the column header cell spans.
FpSpread1.ActiveSheet.AddColumnHeaderSpanCell(1, 0, 1, 2)
FpSpread1.ActiveSheet.AddColumnHeaderSpanCell(1, 2, 1, 2)
FpSpread1.ActiveSheet.AddColumnHeaderSpanCell(1, 4, 1, 2)
FpSpread1.ActiveSheet.AddColumnHeaderSpanCell(1, 6, 1, 2)
FpSpread1.ActiveSheet.AddColumnHeaderSpanCell(0, 0, 1, 8)
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         FarPoint.Win.Spread.CellSpanSelectionPolicy

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

FarPoint.Win.Spread Namespace

 

 


Copyright © GrapeCity, inc. All rights reserved.