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

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

DataGridViewColumn.CellTemplate プロパティ

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

新しセル作成使用するテンプレート取得または設定します

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

Public Overridable Property
 CellTemplate As DataGridViewCell
Dim instance As DataGridViewColumn
Dim value As DataGridViewCell

value = instance.CellTemplate

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

/** @property */
public void set_CellTemplate (DataGridViewCell
 value)
public function get CellTemplate
 () : DataGridViewCell

public function set CellTemplate
 (value : DataGridViewCell)

プロパティ
列に含まれる他のすべてのセルモデルとする DataGridViewCell。既定値null 参照 (Visual Basic では Nothing) です。

解説解説
使用例使用例

DataGridViewColumnテンプレートとして DataGridViewCell使用する方法コード例次に示します。列のセルスタイルの変更は、その列のすべてのセル影響します。このコード例は、DataGridViewColumn クラストピック取り上げているコード例一部分です。

Private Sub CustomizeCellsInThirdColumn()

    Dim thirdColumn As Integer
 = 2
    Dim column As DataGridViewColumn = _
        dataGridView.Columns(thirdColumn)
    Dim cell As DataGridViewCell = _
        New DataGridViewTextBoxCell()

    cell.Style.BackColor = Color.Wheat
    column.CellTemplate = cell
End Sub
private void CustomizeCellsInThirdColumn()
{
    int thirdColumn = 2;
    DataGridViewColumn column =
        dataGridView.Columns[thirdColumn];
    DataGridViewCell cell = new DataGridViewTextBoxCell();

    cell.Style.BackColor = Color.Wheat;
    column.CellTemplate = cell;
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridViewColumn クラス
DataGridViewColumn メンバ
System.Windows.Forms 名前空間
DataGridView クラス
DataGridViewCell クラス
DataGridViewColumn
DataGridView.InvalidateColumn


このページでは「.NET Framework クラス ライブラリ リファレンス」からDataGridViewColumn.CellTemplate プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からDataGridViewColumn.CellTemplate プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からDataGridViewColumn.CellTemplate プロパティ を検索

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

辞書ショートカット

すべての辞書の索引

「DataGridViewColumn.CellTemplate プロパティ」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS