DataGridViewLinkCell クラスとは? わかりやすく解説

DataGridViewLinkCell クラス

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

リンクを含むセル表します

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

Public Class DataGridViewLinkCell
    Inherits DataGridViewCell
Dim instance As DataGridViewLinkCell
public class DataGridViewLinkCell : DataGridViewCell
public ref class DataGridViewLinkCell : public
 DataGridViewCell
public class DataGridViewLinkCell extends DataGridViewCell
public class DataGridViewLinkCell extends
 DataGridViewCell
解説解説

DataGridViewLinkCell クラスは、DataGridViewCell の特殊な型で、リンクを表示するために使用されます。通常DataGridViewLinkCellReadOnly プロパティtrue設定されるため、ユーザーセル内容編集できません。

DataGridViewLinkColumn は、この型のセル保持するための特殊な列型です。既存DataGridViewLinkCell を列に含まれる他のセルモデルにするには、そのセルを列の CellTemplate プロパティ設定します既定では、CellTemplate新しDataGridViewLinkCell初期化されます

列のセル関連プロパティは、テンプレート セル類似した名前を持つプロパティラッパーです。テンプレート セルプロパティ値を変更すると、そのテンプレートベースとするセルのうち、変更後追加されたものにのみ変更反映されます。一方、列のセル関連プロパティ変更すると、テンプレート セル、および列内の他のすべてのセル更新され必要に応じて列の表示更新されます。

継承時の注意 DataGridViewLinkCell からクラス派生させて新しプロパティ追加する場合は、Clone メソッドオーバーライドして、クローン操作時に新しプロパティコピーする必要がありますまた、基本クラスClone メソッド呼び出して基本クラスプロパティ新しセルコピーされるようにする必要があります

使用例使用例

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;
}
継承階層継承階層
System.Object
   System.Windows.Forms.DataGridViewElement
     System.Windows.Forms.DataGridViewCell
      System.Windows.Forms.DataGridViewLinkCell
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataGridViewLinkCell メンバ
System.Windows.Forms 名前空間
DataGridView クラス
DataGridViewCell クラス
DataGridViewLinkColumn
DataGridViewLinkColumn.CellTemplate
DataGridViewColumn クラス
Clone



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

辞書ショートカット

すべての辞書の索引

「DataGridViewLinkCell クラス」の関連用語

DataGridViewLinkCell クラスのお隣キーワード
検索ランキング

   

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



DataGridViewLinkCell クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2024 GRAS Group, Inc.RSS