DataGridViewButtonCell クラス

定義

DataGridView コントロールで使用する、ボタン状のユーザー インターフェイス (UI) を表示します。

public ref class DataGridViewButtonCell : System::Windows::Forms::DataGridViewCell
public class DataGridViewButtonCell : System.Windows.Forms.DataGridViewCell
type DataGridViewButtonCell = class
    inherit DataGridViewCell
Public Class DataGridViewButtonCell
Inherits DataGridViewCell
継承

次のコード例では、 を使用 DataGridViewButtonColumn して特定の行に対してアクションを実行する方法を示します。 個々 DataGridViewButtonCell のオブジェクトを操作するときに、同様のコードを使用できます。 この例では、イベント ハンドラーは DataGridView.CellClick 最初にクリックがボタン セルにあるかどうかを判断し、その行に関連付けられているビジネス オブジェクトを取得します。 この例は、「How to: Access Objects in a Windows フォーム DataGridViewComboBoxCell Drop-Down List」で使用できる大きな例の一部です。

public class Form1 : Form
{
    private List<Employee> employees = new List<Employee>();
    private List<Task> tasks = new List<Task>();
    private Button reportButton = new Button();
    private DataGridView dataGridView1 = new DataGridView();

    [STAThread]
    public static void Main()
    {
        Application.Run(new Form1());
    }

    public Form1()
    {
        dataGridView1.Dock = DockStyle.Fill;
        dataGridView1.AutoSizeColumnsMode = 
            DataGridViewAutoSizeColumnsMode.AllCells;
        reportButton.Text = "Generate Report";
        reportButton.Dock = DockStyle.Top;
        reportButton.Click += new EventHandler(reportButton_Click);

        Controls.Add(dataGridView1);
        Controls.Add(reportButton);
        Load += new EventHandler(Form1_Load);
        Text = "DataGridViewComboBoxColumn Demo";
    }

    // Initializes the data source and populates the DataGridView control.
    private void Form1_Load(object sender, EventArgs e)
    {
        PopulateLists();
        dataGridView1.AutoGenerateColumns = false;
        dataGridView1.DataSource = tasks;
        AddColumns();
    }

    // Populates the employees and tasks lists. 
    private void PopulateLists()
    {
        employees.Add(new Employee("Harry"));
        employees.Add(new Employee("Sally"));
        employees.Add(new Employee("Roy"));
        employees.Add(new Employee("Pris"));
        tasks.Add(new Task(1, employees[1]));
        tasks.Add(new Task(2));
        tasks.Add(new Task(3, employees[2]));
        tasks.Add(new Task(4));
    }

    // Configures columns for the DataGridView control.
    private void AddColumns()
    {
        DataGridViewTextBoxColumn idColumn = 
            new DataGridViewTextBoxColumn();
        idColumn.Name = "Task";
        idColumn.DataPropertyName = "Id";
        idColumn.ReadOnly = true;

        DataGridViewComboBoxColumn assignedToColumn = 
            new DataGridViewComboBoxColumn();

        // Populate the combo box drop-down list with Employee objects. 
        foreach (Employee e in employees) assignedToColumn.Items.Add(e);

        // Add "unassigned" to the drop-down list and display it for 
        // empty AssignedTo values or when the user presses CTRL+0. 
        assignedToColumn.Items.Add("unassigned");
        assignedToColumn.DefaultCellStyle.NullValue = "unassigned";

        assignedToColumn.Name = "Assigned To";
        assignedToColumn.DataPropertyName = "AssignedTo";
        assignedToColumn.AutoComplete = true;
        assignedToColumn.DisplayMember = "Name";
        assignedToColumn.ValueMember = "Self";

        // Add a button column. 
        DataGridViewButtonColumn buttonColumn = 
            new DataGridViewButtonColumn();
        buttonColumn.HeaderText = "";
        buttonColumn.Name = "Status Request";
        buttonColumn.Text = "Request Status";
        buttonColumn.UseColumnTextForButtonValue = true;

        dataGridView1.Columns.Add(idColumn);
        dataGridView1.Columns.Add(assignedToColumn);
        dataGridView1.Columns.Add(buttonColumn);

        // Add a CellClick handler to handle clicks in the button column.
        dataGridView1.CellClick +=
            new DataGridViewCellEventHandler(dataGridView1_CellClick);
    }

    // Reports on task assignments. 
    private void reportButton_Click(object sender, EventArgs e)
    {
        StringBuilder report = new StringBuilder();
        foreach (Task t in tasks)
        {
            String assignment = 
                t.AssignedTo == null ? 
                "unassigned" : "assigned to " + t.AssignedTo.Name;
            report.AppendFormat("Task {0} is {1}.", t.Id, assignment);
            report.Append(Environment.NewLine);
        }
        MessageBox.Show(report.ToString(), "Task Assignments");
    }

    // Calls the Employee.RequestStatus method.
    void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
    {
        // Ignore clicks that are not on button cells. 
        if (e.RowIndex < 0 || e.ColumnIndex !=
            dataGridView1.Columns["Status Request"].Index) return;

        // Retrieve the task ID.
        Int32 taskID = (Int32)dataGridView1[0, e.RowIndex].Value;

        // Retrieve the Employee object from the "Assigned To" cell.
        Employee assignedTo = dataGridView1.Rows[e.RowIndex]
            .Cells["Assigned To"].Value as Employee;

        // Request status through the Employee object if present. 
        if (assignedTo != null)
        {
            assignedTo.RequestStatus(taskID);
        }
        else
        {
            MessageBox.Show(String.Format(
                "Task {0} is unassigned.", taskID), "Status Request");
        }
    }
}
Public Class Form1
    Inherits Form

    Private employees As New List(Of Employee)
    Private tasks As New List(Of Task)
    Private WithEvents reportButton As New Button
    Private WithEvents dataGridView1 As New DataGridView

    <STAThread()> _
    Public Sub Main()
        Application.Run(New Form1)
    End Sub

    Sub New()
        dataGridView1.Dock = DockStyle.Fill
        dataGridView1.AutoSizeColumnsMode = _
            DataGridViewAutoSizeColumnsMode.AllCells
        reportButton.Text = "Generate Report"
        reportButton.Dock = DockStyle.Top

        Controls.Add(dataGridView1)
        Controls.Add(reportButton)
        Text = "DataGridViewComboBoxColumn Demo"
    End Sub

    ' Initializes the data source and populates the DataGridView control.
    Private Sub Form1_Load(ByVal sender As Object, _
        ByVal e As EventArgs) Handles Me.Load

        PopulateLists()
        dataGridView1.AutoGenerateColumns = False
        dataGridView1.DataSource = tasks
        AddColumns()

    End Sub

    ' Populates the employees and tasks lists. 
    Private Sub PopulateLists()
        employees.Add(New Employee("Harry"))
        employees.Add(New Employee("Sally"))
        employees.Add(New Employee("Roy"))
        employees.Add(New Employee("Pris"))
        tasks.Add(New Task(1, employees(1)))
        tasks.Add(New Task(2))
        tasks.Add(New Task(3, employees(2)))
        tasks.Add(New Task(4))
    End Sub

    ' Configures columns for the DataGridView control.
    Private Sub AddColumns()

        Dim idColumn As New DataGridViewTextBoxColumn()
        idColumn.Name = "Task"
        idColumn.DataPropertyName = "Id"
        idColumn.ReadOnly = True

        Dim assignedToColumn As New DataGridViewComboBoxColumn()

        ' Populate the combo box drop-down list with Employee objects. 
        For Each e As Employee In employees
            assignedToColumn.Items.Add(e)
        Next

        ' Add "unassigned" to the drop-down list and display it for 
        ' empty AssignedTo values or when the user presses CTRL+0. 
        assignedToColumn.Items.Add("unassigned")
        assignedToColumn.DefaultCellStyle.NullValue = "unassigned"

        assignedToColumn.Name = "Assigned To"
        assignedToColumn.DataPropertyName = "AssignedTo"
        assignedToColumn.AutoComplete = True
        assignedToColumn.DisplayMember = "Name"
        assignedToColumn.ValueMember = "Self"

        ' Add a button column. 
        Dim buttonColumn As New DataGridViewButtonColumn()
        buttonColumn.HeaderText = ""
        buttonColumn.Name = "Status Request"
        buttonColumn.Text = "Request Status"
        buttonColumn.UseColumnTextForButtonValue = True

        dataGridView1.Columns.Add(idColumn)
        dataGridView1.Columns.Add(assignedToColumn)
        dataGridView1.Columns.Add(buttonColumn)

    End Sub

    ' Reports on task assignments. 
    Private Sub reportButton_Click(ByVal sender As Object, _
        ByVal e As EventArgs) Handles reportButton.Click

        Dim report As New StringBuilder()
        For Each t As Task In tasks
            Dim assignment As String
            If t.AssignedTo Is Nothing Then
                assignment = "unassigned"
            Else
                assignment = "assigned to " + t.AssignedTo.Name
            End If
            report.AppendFormat("Task {0} is {1}.", t.Id, assignment)
            report.Append(Environment.NewLine)
        Next
        MessageBox.Show(report.ToString(), "Task Assignments")

    End Sub

    ' Calls the Employee.RequestStatus method.
    Private Sub dataGridView1_CellClick(ByVal sender As Object, _
        ByVal e As DataGridViewCellEventArgs) _
        Handles dataGridView1.CellClick

        ' Ignore clicks that are not on button cells. 
        If e.RowIndex < 0 OrElse Not e.ColumnIndex = _
            dataGridView1.Columns("Status Request").Index Then Return

        ' Retrieve the task ID.
        Dim taskID As Int32 = CInt(dataGridView1(0, e.RowIndex).Value)

        ' Retrieve the Employee object from the "Assigned To" cell.
        Dim assignedTo As Employee = TryCast(dataGridView1.Rows(e.RowIndex) _
            .Cells("Assigned To").Value, Employee)

        ' Request status through the Employee object if present. 
        If assignedTo IsNot Nothing Then
            assignedTo.RequestStatus(taskID)
        Else
            MessageBox.Show(String.Format( _
                "Task {0} is unassigned.", taskID), "Status Request")
        End If

    End Sub

End Class

注釈

クラスは DataGridViewButtonCell 、ボタンのような UI を表示するために使用される特殊な型 DataGridViewCell です。

DataGridViewButtonColumn は、この型のセルを保持するために特殊化された列型です。 既定では、 DataGridViewButtonColumn.CellTemplate は新 DataGridViewButtonCellしい に初期化されます。 既存 DataGridViewButtonCellの の後の列内のセルをパターン設定するには、パターンとして使用するセルに列の CellTemplate プロパティを設定します。

ユーザー ボタンのクリックに応答するには、 または DataGridView.CellContentClick イベントをDataGridView.CellClick処理します。 イベント ハンドラーでは、 プロパティを DataGridViewCellEventArgs.ColumnIndex 使用して、クリックによってボタン列が発生したかどうかを判断できます。 プロパティを DataGridViewCellEventArgs.RowIndex 使用して、クリックが特定のボタン セルで発生したかどうかを判断できます。

列のセル関連プロパティは、テンプレート セルの同様の名前のプロパティのラッパーです。 テンプレート セルのプロパティ値を変更すると、変更後に追加されたテンプレートに基づくセルにのみ影響します。 ただし、列のセル関連のプロパティ値を変更すると、テンプレート セルと列内の他のすべてのセルが更新され、必要に応じて列の表示が更新されます。

注意

ビジュアル スタイルが有効になっている場合、ボタン列のボタンは を使用して ButtonRenderer塗りつぶされ、 などの DefaultCellStyle プロパティで指定されたセル スタイルは無効になります。

注意 (継承者)

から DataGridViewButtonCell 派生し、派生クラスに新しいプロパティを追加するときは、必ず メソッドを Clone() オーバーライドして、複製操作中に新しいプロパティをコピーしてください。 基底クラスの Clone() プロパティが新しいセルにコピーされるように、基底クラスの メソッドも呼び出す必要があります。

コンストラクター

DataGridViewButtonCell()

DataGridViewButtonCell クラスの新しいインスタンスを初期化します。

プロパティ

AccessibilityObject

DataGridViewCell.DataGridViewCellAccessibleObject に割り当てられた DataGridViewCell を取得します。

(継承元 DataGridViewCell)
ColumnIndex

このセルの列インデックスを取得します。

(継承元 DataGridViewCell)
ContentBounds

セルの内容領域を囲んだ外接する四角形を取得します。

(継承元 DataGridViewCell)
ContextMenuStrip

セルに関連付けられたショートカット メニューを取得または設定します。

(継承元 DataGridViewCell)
DataGridView

この要素に関連付けられている DataGridView コントロールを取得します。

(継承元 DataGridViewElement)
DefaultNewRowValue

新しいレコードの行のセルに対する既定値を取得します。

(継承元 DataGridViewCell)
Displayed

セルが現在画面上に表示されているかどうかを示す値を取得します。

(継承元 DataGridViewCell)
EditedFormattedValue

セルが編集モードであるかどうか、および値がコミットされているかどうかに関係なく、セルの現在の書式指定済みの値を取得します。

(継承元 DataGridViewCell)
EditType

セルのホストされる編集コントロールの型を取得します。

ErrorIconBounds

セルのエラー アイコンの境界を取得します。

(継承元 DataGridViewCell)
ErrorText

セルに関連付けられたエラー条件を記述するテキストを取得または設定します。

(継承元 DataGridViewCell)
FlatStyle

ボタンの外観を決定するスタイルを取得または設定します。

FormattedValue

表示用に書式指定済みのセル値を取得します。

(継承元 DataGridViewCell)
FormattedValueType

セルに関連付けられている、書式設定された値の型を取得します。

Frozen

セルが固定された状態かどうかを示す値を取得します。

(継承元 DataGridViewCell)
HasStyle

Style プロパティが設定されているかどうかを示す値を取得します。

(継承元 DataGridViewCell)
InheritedState

行と列の状態から継承されたセルの現在の状態を取得します。

(継承元 DataGridViewCell)
InheritedStyle

セルに現在適用されているスタイルを取得します。

(継承元 DataGridViewCell)
IsInEditMode

このセルが現在編集されているかどうかを示す値を取得します。

(継承元 DataGridViewCell)
OwningColumn

セルを格納している列を取得します。

(継承元 DataGridViewCell)
OwningRow

セルを格納している行を取得します。

(継承元 DataGridViewCell)
PreferredSize

セルが収まる四角形領域のサイズをピクセル単位で取得します。

(継承元 DataGridViewCell)
ReadOnly

セルのデータを編集できるかどうかを示す値を取得または設定します。

(継承元 DataGridViewCell)
Resizable

セルのサイズを変更できるかどうかを示す値を取得します。

(継承元 DataGridViewCell)
RowIndex

セルの親行のインデックスを取得します。

(継承元 DataGridViewCell)
Selected

セルが選択されているかどうかを示す値を取得または設定します。

(継承元 DataGridViewCell)
Size

セルのサイズを取得します。

(継承元 DataGridViewCell)
State

要素のユーザー インターフェイス (UI) の状態を取得します。

(継承元 DataGridViewElement)
Style

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

(継承元 DataGridViewCell)
Tag

セルに関する補足的なデータを格納するオブジェクトを取得または設定します。

(継承元 DataGridViewCell)
ToolTipText

このセルに関連付けられているツールヒント テキストを取得または設定します。

(継承元 DataGridViewCell)
UseColumnTextForButtonValue

所有側の列のテキストが、セル内のボタンに表示されるかどうかを示す値を取得または設定します。

Value

このセルに関連付けられている値を取得または設定します。

(継承元 DataGridViewCell)
ValueType

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

Visible

非表示にされた行または列にセルが含まれるかどうかを示す値を取得します。

(継承元 DataGridViewCell)

メソッド

AdjustCellBorderStyle(DataGridViewAdvancedBorderStyle, DataGridViewAdvancedBorderStyle, Boolean, Boolean, Boolean, Boolean)

指定した条件に従って、入力セルの境界線スタイルを変更します。

(継承元 DataGridViewCell)
BorderWidths(DataGridViewAdvancedBorderStyle)

すべてのセル マージンの幅を表す Rectangle を返します。

(継承元 DataGridViewCell)
ClickUnsharesRow(DataGridViewCellEventArgs)

セルがクリックされたときに、セルの行の共有を解除するかどうかを示します。

(継承元 DataGridViewCell)
Clone()

対象のセルの同一コピーを作成します。

ContentClickUnsharesRow(DataGridViewCellEventArgs)

セルの内容がクリックされたときに、セルの行の共有を解除するかどうかを示します。

(継承元 DataGridViewCell)
ContentDoubleClickUnsharesRow(DataGridViewCellEventArgs)

セルの内容がダブルクリックされたときに、セルの行の共有を解除するかどうかを示します。

(継承元 DataGridViewCell)
CreateAccessibilityInstance()

DataGridViewButtonCell の新しいユーザー補助オブジェクトを作成します。

DetachEditingControl()

セルの編集コントロールを DataGridView から削除します。

(継承元 DataGridViewCell)
Dispose()

DataGridViewCell によって使用されているすべてのリソースを解放します。

(継承元 DataGridViewCell)
Dispose(Boolean)

DataGridViewCell によって使用されているアンマネージド リソースを解放し、オプションでマネージド リソースも解放します。

(継承元 DataGridViewCell)
DoubleClickUnsharesRow(DataGridViewCellEventArgs)

セルがダブルクリックされたときに、セルの行の共有を解除するかどうかを示します。

(継承元 DataGridViewCell)
EnterUnsharesRow(Int32, Boolean)

フォーカスがセルに移動したときに、親の行を非共有にするかどうかを示します。

(継承元 DataGridViewCell)
Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetClipboardContent(Int32, Boolean, Boolean, Boolean, Boolean, String)

Clipboard にコピーするセルの書式指定済みの値を取得します。

(継承元 DataGridViewCell)
GetContentBounds(Graphics, DataGridViewCellStyle, Int32)

セルの内容領域に外接する四角形を返します。これは、指定された Graphics とセル スタイルを使って計算されます。

GetContentBounds(Int32)

既定の Graphics、およびセルに現在有効なセル スタイルを使用して、セルの内容領域を囲む外接する四角形を返します。

(継承元 DataGridViewCell)
GetEditedFormattedValue(Int32, DataGridViewDataErrorContexts)

セルが編集モードであるかどうか、および値がコミットされているかどうかに関係なく、セルの現在の書式指定済みの値を返します。

(継承元 DataGridViewCell)
GetErrorIconBounds(Graphics, DataGridViewCellStyle, Int32)

セルのエラー アイコンが表示されている場合に、そのエラー アイコンを囲む外接する四角形を返します。

GetErrorText(Int32)

セルのエラーを表す文字列を返します。

(継承元 DataGridViewCell)
GetFormattedValue(Object, Int32, DataGridViewCellStyle, TypeConverter, TypeConverter, DataGridViewDataErrorContexts)

表示用に書式指定済みのセル値を取得します。

(継承元 DataGridViewCell)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetInheritedContextMenuStrip(Int32)

現在のセルの継承されたショートカット メニューを取得します。

(継承元 DataGridViewCell)
GetInheritedState(Int32)

行および列の状態から継承されたセルの現在の状態を示す値を返します。

(継承元 DataGridViewCell)
GetInheritedStyle(DataGridViewCellStyle, Int32, Boolean)

セルに適用されるスタイルを取得します。

(継承元 DataGridViewCell)
GetPreferredSize(Graphics, DataGridViewCellStyle, Int32, Size)

セルの推奨されるサイズをピクセル単位で計算します。

GetSize(Int32)

セルのサイズを取得します。

(継承元 DataGridViewCell)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
GetValue(Int32)

ボタンに関連付けられているテキストを取得します。

InitializeEditingControl(Int32, Object, DataGridViewCellStyle)

セルの編集に使用されるコントロールを初期化します。

(継承元 DataGridViewCell)
KeyDownUnsharesRow(KeyEventArgs, Int32)

行のセルにフォーカスがあるときに、キーが押された場合、その行の共有を解除するかどうかを示します。

KeyEntersEditMode(KeyEventArgs)

押されたキーに基づいて編集モードを開始するかどうかを決定します。

(継承元 DataGridViewCell)
KeyPressUnsharesRow(KeyPressEventArgs, Int32)

行内のセルにフォーカスがあるときにキーが押された場合に、行を非共有にするかどうかを示します。

(継承元 DataGridViewCell)
KeyUpUnsharesRow(KeyEventArgs, Int32)

行のセルにフォーカスがあるときに、キーを離した場合、その行の共有を解除するかどうかを示します。

LeaveUnsharesRow(Int32, Boolean)

フォーカスが行のセルを離れたときに、その行を非共有にするかどうかを示します。

(継承元 DataGridViewCell)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
MouseClickUnsharesRow(DataGridViewCellMouseEventArgs)

マウス ポインターを行のセルに置いた状態でマウス ボタンをクリックしたときに、その行を非共有にするかどうかを示します。

(継承元 DataGridViewCell)
MouseDoubleClickUnsharesRow(DataGridViewCellMouseEventArgs)

行内のセルをダブルクリックした場合に、その行を非共有にするかどうかを示します。

(継承元 DataGridViewCell)
MouseDownUnsharesRow(DataGridViewCellMouseEventArgs)

マウス ポインターを行のセルに置いた状態でマウス ボタンを押したままにしたときに、その行の非共有にするかどうかを示します。

MouseEnterUnsharesRow(Int32)

マウス ポインターを行のセル上に移動したときに行の共有を解除するかどうかを示します。

MouseLeaveUnsharesRow(Int32)

マウス ポインターを行から離したときに行の共有を解除するかどうかを示します。

MouseMoveUnsharesRow(DataGridViewCellMouseEventArgs)

マウス ポインターを行のセル上に移動したときに行の共有を解除するかどうかを示します。

(継承元 DataGridViewCell)
MouseUpUnsharesRow(DataGridViewCellMouseEventArgs)

マウス ポインターを行のセルに置いた状態でマウス ボタンを離したときに、その行の共有を解除するかどうかを示します。

OnClick(DataGridViewCellEventArgs)

セルがクリックされたときに呼び出されます。

(継承元 DataGridViewCell)
OnContentClick(DataGridViewCellEventArgs)

セルの内容がクリックされたときに呼び出されます。

(継承元 DataGridViewCell)
OnContentDoubleClick(DataGridViewCellEventArgs)

セルの内容がダブルクリックされたときに呼び出されます。

(継承元 DataGridViewCell)
OnDataGridViewChanged()

セルの DataGridView プロパティが変更された場合に発生します。

(継承元 DataGridViewCell)
OnDoubleClick(DataGridViewCellEventArgs)

セルがダブルクリックされたときに呼び出されます。

(継承元 DataGridViewCell)
OnEnter(Int32, Boolean)

フォーカスがセルに移動するときに呼び出されます。

(継承元 DataGridViewCell)
OnKeyDown(KeyEventArgs, Int32)

セルにフォーカスがある状態で文字キーが押されたときに呼び出されます。

OnKeyPress(KeyPressEventArgs, Int32)

セルにフォーカスがある状態でキーが押されたときに呼び出されます。

(継承元 DataGridViewCell)
OnKeyUp(KeyEventArgs, Int32)

セルにフォーカスがある状態で文字キーが離されたときに呼び出されます。

OnLeave(Int32, Boolean)

フォーカスがセルから離れるときに呼び出されます。

OnMouseClick(DataGridViewCellMouseEventArgs)

マウス ポインターがセル上にあるときにマウス ボタンをクリックすると呼び出されます。

(継承元 DataGridViewCell)
OnMouseDoubleClick(DataGridViewCellMouseEventArgs)

マウス ポインターがセル上にあるときにマウス ボタンをダブルクリックすると呼び出されます。

(継承元 DataGridViewCell)
OnMouseDown(DataGridViewCellMouseEventArgs)

マウス ポインターをセルに置いた状態でマウス ボタンを押し下げたときに呼び出されます。

OnMouseEnter(Int32)

マウス ポインターがセル上を移動すると呼び出されます。

(継承元 DataGridViewCell)
OnMouseLeave(Int32)

マウス ポインターがセルに入ると呼び出されます。

OnMouseMove(DataGridViewCellMouseEventArgs)

セル上でマウス ポインターを移動すると呼び出されます。

OnMouseUp(DataGridViewCellMouseEventArgs)

マウス ポインターをセルに置いた状態でマウス ボタンを離したときに呼び出されます。

Paint(Graphics, Rectangle, Rectangle, Int32, DataGridViewElementStates, Object, Object, String, DataGridViewCellStyle, DataGridViewAdvancedBorderStyle, DataGridViewPaintParts)

現在の DataGridViewButtonCell を描画します。

PaintBorder(Graphics, Rectangle, Rectangle, DataGridViewCellStyle, DataGridViewAdvancedBorderStyle)

現在の DataGridViewCell の境界線を描画します。

(継承元 DataGridViewCell)
PaintErrorIcon(Graphics, Rectangle, Rectangle, String)

現在の DataGridViewCell のエラー アイコンを描画します。

(継承元 DataGridViewCell)
ParseFormattedValue(Object, DataGridViewCellStyle, TypeConverter, TypeConverter)

表示用に書式設定された値を、実際のセル値に変換します。

(継承元 DataGridViewCell)
PositionEditingControl(Boolean, Boolean, Rectangle, Rectangle, DataGridViewCellStyle, Boolean, Boolean, Boolean, Boolean)

DataGridView コントロールのセルによってホストされる編集コントロールの位置とサイズを設定します。

(継承元 DataGridViewCell)
PositionEditingPanel(Rectangle, Rectangle, DataGridViewCellStyle, Boolean, Boolean, Boolean, Boolean)

セルによってホストされる編集パネルの位置とサイズを設定し、編集パネル内の編集コントロールの標準の境界を返します。

(継承元 DataGridViewCell)
RaiseCellClick(DataGridViewCellEventArgs)

CellClick イベントを発生させます。

(継承元 DataGridViewElement)
RaiseCellContentClick(DataGridViewCellEventArgs)

CellContentClick イベントを発生させます。

(継承元 DataGridViewElement)
RaiseCellContentDoubleClick(DataGridViewCellEventArgs)

CellContentDoubleClick イベントを発生させます。

(継承元 DataGridViewElement)
RaiseCellValueChanged(DataGridViewCellEventArgs)

CellValueChanged イベントを発生させます。

(継承元 DataGridViewElement)
RaiseDataError(DataGridViewDataErrorEventArgs)

DataError イベントを発生させます。

(継承元 DataGridViewElement)
RaiseMouseWheel(MouseEventArgs)

MouseWheel イベントを発生させます。

(継承元 DataGridViewElement)
SetValue(Int32, Object)

セルの値を設定します。

(継承元 DataGridViewCell)
ToString()

セルの文字列形式を返します。

適用対象

こちらもご覧ください