Spread ASP.NET 6.0 Product Documentation
IntersectColumn Method
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > CellRange Class : IntersectColumn Method


column
Column index

Glossary Item Box

Determines whether the range of cells intersects the specified column.

Syntax

Visual Basic (Declaration) 
Public Function IntersectColumn( _
   ByVal column As Integer _
) As Boolean
Visual Basic (Usage)Copy Code
Dim instance As CellRange
Dim column As Integer
Dim value As Boolean
 
value = instance.IntersectColumn(column)
C# 
public bool IntersectColumn( 
   int column
)

Parameters

column
Column index

Return Value

true if selected range intersects the specified column; false otherwise

Example

This example creates a CellRange and uses it to set up a selection and a span in the spreadsheet. The several Intersect methods then query whether the selected range intersects the specified column and row and the result is returned to a list box.
C#Copy Code
FarPoint.Web.Spread.Model.CellRangerange=newFarPoint.Web.Spread.Model.CellRange(0,0,4,4);
FarPoint.Web.Spread.Model.BaseSheetSelectionModelmodel;
model=(FarPoint.Web.Spread.Model.BaseSheetSelectionModel)FpSpread1.ActiveSheetView.SelectionModel;
FpSpread1.ActiveSheetView.SelectionBackColor=Color.Yellow;
model.AddSelection(range.Row,range.Column,range.RowCount,range.ColumnCount);
boolb,b1,b2;
FpSpread1.ActiveSheetView.ColumnCount=10;
FpSpread1.ActiveSheetView.RowCount=10;
FpSpread1.ActiveSheetView.AddSpanCell(range.Row,range.Column,range.RowCount,range.ColumnCount);
b=range.IntersectColumn(1);
b1=range.IntersectRow(1);
b2=range.Intersects(0,0,4,4);
ListBox1.Items.Add(Convert.ToString(b));
ListBox1.Items.Add(Convert.ToString(b1));
ListBox1.Items.Add(Convert.ToString(b2));
Visual BasicCopy Code
DimrangeAsNewFarPoint.Web.Spread.Model.CellRange(1,1,4,4)
Dimrange1AsNewFarPoint.Web.Spread.Model.CellRange(0,0,4,4)
DimmodelAsFarPoint.Web.Spread.Model.BaseSheetSelectionModel
model=FpSpread1.ActiveSheetView.SelectionModel
FpSpread1.ActiveSheetView.SelectionBackColor=Color.Yellow
model.AddSelection(range.Row,range.Column,range.RowCount,range.ColumnCount)
Dimb,b1,b2AsBoolean
FpSpread1.ActiveSheetView.ColumnCount=10
FpSpread1.ActiveSheetView.RowCount=10
FpSpread1.ActiveSheetView.AddSpanCell(range.Row,range.Column,range.RowCount,range.ColumnCount)
b=range.IntersectColumn(1)
b1=range.IntersectRow(1)
b2=range.Intersects(0,0,4,4)
ListBox1.Items.Add(b)
ListBox1.Items.Add(b1)
ListBox1.Items.Add(b2)

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2002-2012 GrapeCity, Inc. All Rights Reserved.