DataGridView.SetCurrentCellAddressCore メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DataGridView.SetCurrentCellAddressCore メソッドの意味・解説 

DataGridView.SetCurrentCellAddressCore メソッド

メモ : このメソッドは、.NET Framework version 2.0 で新しく追加されたものです。

現在アクティブなセルを設定します。

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Protected Overridable Function
 SetCurrentCellAddressCore ( _
    columnIndex As Integer, _
    rowIndex As Integer, _
    setAnchorCellAddress As Boolean, _
    validateCurrentCell As Boolean, _
    throughMouseClick As Boolean _
) As Boolean
Dim columnIndex As Integer
Dim rowIndex As Integer
Dim setAnchorCellAddress As Boolean
Dim validateCurrentCell As Boolean
Dim throughMouseClick As Boolean
Dim returnValue As Boolean

returnValue = Me.SetCurrentCellAddressCore(columnIndex, rowIndex,
 setAnchorCellAddress, validateCurrentCell, throughMouseClick)
protected virtual bool SetCurrentCellAddressCore
 (
    int columnIndex,
    int rowIndex,
    bool setAnchorCellAddress,
    bool validateCurrentCell,
    bool throughMouseClick
)
protected:
virtual bool SetCurrentCellAddressCore (
    int columnIndex, 
    int rowIndex, 
    bool setAnchorCellAddress, 
    bool validateCurrentCell, 
    bool throughMouseClick
)
protected boolean SetCurrentCellAddressCore (
    int columnIndex, 
    int rowIndex, 
    boolean setAnchorCellAddress, 
    boolean validateCurrentCell, 
    boolean throughMouseClick
)
protected function SetCurrentCellAddressCore
 (
    columnIndex : int, 
    rowIndex : int, 
    setAnchorCellAddress : boolean, 
    validateCurrentCell : boolean, 
    throughMouseClick : boolean
) : boolean

パラメータ

columnIndex

セルを含む列のインデックス。

rowIndex

セルを含む行のインデックス。

setAnchorCellAddress

新たにアクティブになったセルを、Shift キーを使用して後続の複数セルを選択するためのアンカー セルにする場合は true。それ以外の場合は false。

validateCurrentCell

古いセルの値を検証して、検証が失敗したら変更をキャンセルする場合は true。それ以外の場合は false。

throughMouseClick

現在のセルがマウス クリックの結果として設定されている場合は true。それ以外の場合は false。

戻り値
現在のセルが正常に設定された場合は true。それ以外の場合は false。

例外例外
例外の種類条件

ArgumentOutOfRangeException

columnIndex が 0 未満か、コントロールの列数 -1 を上回っており、rowIndex が -1 ではありません。

または

rowIndex が 0 未満か、コントロールの行数 -1 を上回っており、columnIndex が -1 ではありません。

InvalidOperationException

指定されたセルの Visible プロパティ値は false です。

または

このメソッドは、基になるデータ ソースのリセット以外の理由で呼び出され、現在は別のスレッドがこのメソッドを実行しています。

InvalidCastException

新たにアクティブになったセルが編集モードに移行しようとしましたが、このセルの EditType プロパティには、IDataGridViewEditingControl を実装する、Control の派生クラスが指定されていません。

解説解説
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

DataGridView.SetCurrentCellAddressCore メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DataGridView.SetCurrentCellAddressCore メソッドのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS