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

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

DataGridViewCellStyle プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ Alignment DataGridView のセルにおけるセル内容の場所を示す値を取得または設定します
パブリック プロパティ BackColor DataGridViewセル背景色取得または設定します
パブリック プロパティ DataSourceNullValue ユーザーセルnull 値入力したときにデータ ソース保存される値を取得または設定します
パブリック プロパティ Font DataGridViewセル含まれるテキスト形式内容適用されるフォント取得または設定します
パブリック プロパティ ForeColor DataGridViewセル前景色を取得または設定します
パブリック プロパティ Format DataGridViewセル含まれるテキスト形式内容適用される書式指定文字列取得または設定します
パブリック プロパティ FormatProvider DataGridViewセル値にカルチャ固有の書式指定適用するために使用するオブジェクト取得または設定します
パブリック プロパティ IsDataSourceNullValueDefault DataSourceNullValue プロパティ設定されているかどうかを示す値を取得します
パブリック プロパティ IsFormatProviderDefault FormatProvider プロパティ設定されているかどうかを示す値を取得します
パブリック プロパティ IsNullValueDefault NullValue プロパティ設定されているかどうかを示す値を取得します
パブリック プロパティ NullValue セル値が DBNull.Value または null 参照 (Visual Basic では Nothing) である場合DataGridViewセル表示する値を取得または設定します
パブリック プロパティ Padding DataGridViewCell の端とその内容との間隔取得または設定します
パブリック プロパティ SelectionBackColor DataGridViewセル選択されたときに使用する背景色取得または設定します
パブリック プロパティ SelectionForeColor DataGridViewセル選択されたときに使用する前景色を取得または設定します
パブリック プロパティ Tag DataGridViewCellStyle に関する追加データ格納するオブジェクト取得または設定します
パブリック プロパティ WrapMode DataGridViewセル含まれるテキスト形式内容が 1 行に収まらないほど長い場合に、次の行に折り返されるか、切り捨てられるかを示す値を取得または設定します
参照参照

関連項目

DataGridViewCellStyle クラス
System.Windows.Forms 名前空間
DataGridView クラス
DataGridView.DefaultCellStyle プロパティ
DataGridView.RowsDefaultCellStyle プロパティ
DataGridView.AlternatingRowsDefaultCellStyle プロパティ
DataGridView.ColumnHeadersDefaultCellStyle プロパティ
DataGridView.RowHeadersDefaultCellStyle プロパティ
DataGridView.CellFormatting イベント
DataGridView.CellStyleContentChanged イベント
DataGridViewBand.InheritedStyle プロパティ
DataGridViewBand.DefaultCellStyle プロパティ
DataGridViewRow.DefaultCellStyle
DataGridViewColumn.DefaultCellStyle
DataGridViewCell.InheritedStyle プロパティ
DataGridViewCell.Style プロパティ
DataGridViewCellFormattingEventArgs クラス

その他の技術情報

Windows フォーム DataGridView コントロールでのセルスタイル
DataGridView コントロール概要 (Windows フォーム)

DataGridViewCell.Style プロパティ

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

セルスタイル取得または設定します

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

Public Property Style As
 DataGridViewCellStyle
Dim instance As DataGridViewCell
Dim value As DataGridViewCellStyle

value = instance.Style

instance.Style = value
public DataGridViewCellStyle Style { get; set;
 }
public:
property DataGridViewCellStyle^ Style {
    DataGridViewCellStyle^ get ();
    void set (DataGridViewCellStyle^ value);
}
/** @property */
public DataGridViewCellStyle get_Style ()

/** @property */
public void set_Style (DataGridViewCellStyle
 value)
public function get Style
 () : DataGridViewCellStyle

public function set Style
 (value : DataGridViewCellStyle)

プロパティ
DataGridViewCellStyle。

解説解説
使用例使用例

Style プロパティ使用してセル背景色取得する方法次のコード例示します。このコード例は、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;
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridViewCell クラス
DataGridViewCell メンバ
System.Windows.Forms 名前空間
DataGridView クラス
DataGridViewCellStyle
DataGridView.CellStyleChanged イベント
DataGridView.DefaultCellStyle プロパティ
DataGridViewRow.DefaultCellStyle
DataGridViewColumn.DefaultCellStyle



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

辞書ショートカット

すべての辞書の索引

「DataGridViewCellStyle プロパティ」の関連用語

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

   

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



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

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

©2024 GRAS Group, Inc.RSS