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

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

DataGridViewCell.ValueType プロパティ

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

セル内の値のデータ型取得または設定します

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

解説解説
使用例使用例

セル値の変更時に ValueType プロパティ設定する方法次のコード例示します次のコード例は、「方法 : Windows フォームの DataGridView コントロールの行を操作する」で示されている例の一部です。

' Give cheescake excellent rating.
Private Sub Button8_Click(ByVal
 sender As Object, _
    ByVal e As System.EventArgs) Handles
 Button8.Click

    UpdateStars(dataGridView.Rows(4), "******************")
End Sub

Private ratingColumn As Integer
 = 3

Private Sub UpdateStars(ByVal
 row As DataGridViewRow, _
    ByVal stars As String)

    row.Cells(ratingColumn).Value = stars

    ' Resize the column width to account for the new value.
    row.DataGridView.AutoResizeColumn(ratingColumn, _
        DataGridViewAutoSizeColumnMode.DisplayedCells)

End Sub
// Give cheescake excellent rating.
private void Button8_Click(object sender,
    System.EventArgs e)
{
    UpdateStars(dataGridView.Rows[4], "******************");
}

int ratingColumn = 3;

private void UpdateStars(DataGridViewRow row,
 string stars)
{

    row.Cells[ratingColumn].Value = stars;

    // Resize the column width to account for the new value.
    row.DataGridView.AutoResizeColumn(ratingColumn, 
        DataGridViewAutoSizeColumnMode.DisplayedCells);
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridViewCell クラス
DataGridViewCell メンバ
System.Windows.Forms 名前空間
DataGridView クラス
DataGridViewCell.Value プロパティ
DataGridViewColumn.ValueType
DataGridViewCell.FormattedValueType プロパティ



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

辞書ショートカット

すべての辞書の索引

「DataGridViewCell.ValueType プロパティ」の関連用語

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

   

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



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

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

©2024 GRAS Group, Inc.RSS