DataGridView.FirstDisplayedCell プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > DataGridView.FirstDisplayedCell プロパティの意味・解説 

DataGridView.FirstDisplayedCell プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

DataGridView に現在表示されている最初セル取得または設定します通常、このセル左上隅にあります

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

Public Property FirstDisplayedCell As
 DataGridViewCell
Dim instance As DataGridView
Dim value As DataGridViewCell

value = instance.FirstDisplayedCell

instance.FirstDisplayedCell = value
public DataGridViewCell FirstDisplayedCell { get;
 set; }
public:
property DataGridViewCell^ FirstDisplayedCell {
    DataGridViewCell^ get ();
    void set (DataGridViewCell^ value);
}
/** @property */
public DataGridViewCell get_FirstDisplayedCell ()

/** @property */
public void set_FirstDisplayedCell (DataGridViewCell
 value)
public function get FirstDisplayedCell
 () : DataGridViewCell

public function set FirstDisplayedCell
 (value : DataGridViewCell)

プロパティ
現在コントロール表示されている最初の DataGridViewCell。

例外例外
例外種類条件

ArgumentException

このプロパティ設定時に指定されセルDataGridView にありません。

InvalidOperationException

このプロパティ設定時に指定されセルには、RowIndex プロパティまたは ColumnIndex プロパティの値として -1 が設定されています。これは、ヘッダー セルまたは共有セル示します

または

このプロパティ設定時に指定されセルには、Visible プロパティの値として false設定されています。

解説解説
使用例使用例

現在のセル並べ替えの後に表示されるようにするコード例次に示します。このコードは、バインドされていない DataGridView コントロールでだけ使用できます外部データ ソースバインドされた DataGridView コントロール場合現在のセルは、並べ替え時に自動的に永続化されません。

この例を実行するには、dataGridView1 という名前の DataGridView配置されているフォームに、次のコード貼り付けます。C# では、Sorted イベントイベント ハンドラ関連付ける必要もあります

Private Sub dataGridView1_Sorted(ByVal
 sender As Object, _
    ByVal e As System.EventArgs) Handles
 dataGridView1.Sorted

    Me.dataGridView1.FirstDisplayedCell = Me.dataGridView1.CurrentCell

End Sub
private void dataGridView1_Sorted(object sender,
 EventArgs e)
{
    this.dataGridView1.FirstDisplayedCell = this.dataGridView1.CurrentCell;
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

DataGridView.FirstDisplayedCell プロパティのお隣キーワード
検索ランキング

   

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



DataGridView.FirstDisplayedCell プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS