Spread Windows Forms 10.0 Product Documentation
AnchorColumn Property (ISheetSelectionModel)
Example 


Gets the column index of the first cell in the selection of cells.
Syntax
'Declaration
 
ReadOnly Property AnchorColumn As Integer
'Usage
 
Dim instance As ISheetSelectionModel
Dim value As Integer
 
value = instance.AnchorColumn
int AnchorColumn {get;}

Property Value

Integer column index
Example
This example returns the column index and row index of the first cell selected in the range.
FarPoint.Win.Spread.Model.ISheetSelectionModel sel;
int i, j;
sel = (FarPoint.Win.Spread.Model.ISheetSelectionModel)fpSpread1.ActiveSheet.Models.Selection;
sel.SetSelection(0, 0, 2, 2);
i = sel.AnchorColumn;
j = sel.AnchorRow;
label1.Text = "The anchor column is " + i.ToString() + " - The anchor row is " + j.ToString();
Dim sel As FarPoint.Win.Spread.Model.ISheetSelectionModel
Dim i, j As Integer
sel = FpSpread1.ActiveSheet.Models.Selection
sel.SetSelection(0, 0, 2, 2)
i = sel.AnchorColumn
j = sel.AnchorRow
Label1.Text = "The anchor column is " & i.ToString() & " - The anchor row is " & j.ToString()
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

ISheetSelectionModel Interface
ISheetSelectionModel Members

 

 


Copyright © GrapeCity, inc. All rights reserved.