GrapeCity SPREAD for WPF 2.0J
ActiveCellPosition プロパティ

GcSpreadGrid 上のアクティブセルの位置を取得または設定します。
構文
'Declaration
 
Public Property ActiveCellPosition As CellPosition
public CellPosition ActiveCellPosition {get; set;}

プロパティ値

現在アクティブなセルの位置を示す CellPosition
例外
例外説明
System.ArgumentOutOfRangeException指定された CellPosition の RowIndex または CellIndex が範囲外であるか、ColumnName が無効です。
System.InvalidOperationExceptionOperationModeOperationMode.Normal ではありません。
次のサンプルは ActiveCellPosition プロパティの設定方法を説明します。
public void ActiveCell()
{
    gcSpreadGrid1.ActiveCellPosition = new CellPosition(2, 3);

    Console.WriteLine("The active cell is " + gcSpreadGrid1.ActiveCell.ToString());
    Console.WriteLine("The active cell position is " + gcSpreadGrid1.ActiveCellPosition.ToString());
    Console.WriteLine("The active column is " + gcSpreadGrid1.ActiveColumn.ToString());
    Console.WriteLine("The active column index is " + gcSpreadGrid1.ActiveColumnIndex.ToString());
    Console.WriteLine("The active row is " + gcSpreadGrid1.ActiveRow.ToString());
    Console.WriteLine("The active row index is " + gcSpreadGrid1.ActiveRowIndex.ToString());
}
Public Sub ActiveCell()
    gcSpreadGrid1.ActiveCellPosition = New CellPosition(2, 3)

    Console.WriteLine("The active cell is " & gcSpreadGrid1.ActiveCell.ToString())
    Console.WriteLine("The active cell position is " & gcSpreadGrid1.ActiveCellPosition.ToString())
    Console.WriteLine("The active column is " & gcSpreadGrid1.ActiveColumn.ToString())
    Console.WriteLine("The active column index is " & gcSpreadGrid1.ActiveColumnIndex.ToString())
    Console.WriteLine("The active row is " & gcSpreadGrid1.ActiveRow.ToString())
    Console.WriteLine("The active row index is " & gcSpreadGrid1.ActiveRowIndex.ToString())
End Sub
参照

GcSpreadGrid クラス
GcSpreadGrid メンバ

 

 


Copyright © 2012 GrapeCity inc. All rights reserved.