다음을 통해 공유


DataGridViewButtonCell 클래스

정의

컨트롤에서 사용할 단추와 유사한 UI(사용자 인터페이스)를 DataGridView 표시합니다.

public ref class DataGridViewButtonCell : System::Windows::Forms::DataGridViewCell
public class DataGridViewButtonCell : System.Windows.Forms.DataGridViewCell
[System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)]
public class DataGridViewButtonCell : System.Windows.Forms.DataGridViewCell
type DataGridViewButtonCell = class
    inherit DataGridViewCell
[<System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembers(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicParameterlessConstructor)>]
type DataGridViewButtonCell = class
    inherit DataGridViewCell
Public Class DataGridViewButtonCell
Inherits DataGridViewCell
상속
특성

예제

다음 코드 예제에서는 특정 행에 대 한 DataGridViewButtonColumn 작업을 수행 하는 데 사용 하는 방법을 보여 줍니다. 개별 DataGridViewButtonCell 개체로 작업할 때 비슷한 코드를 사용할 수 있습니다. 이 예제 DataGridView.CellClick 에서 이벤트 처리기는 먼저 클릭이 단추 셀에 있는지 여부를 확인한 다음 행과 연결된 비즈니스 개체를 검색합니다. 이 예제는 방법: Windows Forms DataGridViewComboBoxCell Drop-Down 목록의 개체 액세스에서 사용할 수 있는 더 큰 예제의 일부입니다.

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.CellTemplateDataGridViewButtonCell초기화됩니다. 기존 DataGridViewButtonCell열 뒤의 열 내 셀을 패턴화하려면 열의 CellTemplate 속성을 패턴으로 사용할 셀로 설정합니다.

사용자 단추 클릭에 응답하려면 또는 DataGridView.CellContentClick 이벤트를 처리 DataGridView.CellClick 합니다. 이벤트 처리기에서 이 속성을 사용하여 DataGridViewCellEventArgs.ColumnIndex 클릭이 단추 열에서 발생했는지 여부를 확인할 수 있습니다. 이 속성을 사용하여 DataGridViewCellEventArgs.RowIndex 특정 단추 셀에서 클릭이 발생했는지 여부를 확인할 수 있습니다.

열의 셀 관련 속성은 템플릿 셀의 비슷한 이름의 속성에 대한 래퍼입니다. 템플릿 셀의 속성 값을 변경하면 변경 후 추가된 템플릿을 기반으로 하는 셀에만 영향을 미칩니다. 그러나 열의 셀 관련 속성 값을 변경하면 템플릿 셀과 열의 다른 모든 셀이 업데이트되고 필요한 경우 열 표시를 새로 고칩니다.

메모

비주얼 스타일을 사용하도록 설정하면 단추 열의 단추가 효과를 주지 않는 등의 DefaultCellStyle 속성을 통해 지정된 셀 스타일을 사용하여 ButtonRenderer그려집니다.

상속자 참고

파생된 클래스에서 DataGridViewButtonCell 파생되고 새 속성을 추가하는 경우 복제 작업 중에 새 속성을 복사하도록 메서드를 재정 Clone() 의해야 합니다. 기본 클래스의 Clone() 속성이 새 셀에 복사되도록 기본 클래스의 메서드를 호출해야 합니다.

생성자

Name Description
DataGridViewButtonCell()

DataGridViewButtonCell 클래스의 새 인스턴스를 초기화합니다.

속성

Name Description
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

이 셀과 연결된 ToolTip 텍스트를 가져오거나 설정합니다.

(다음에서 상속됨 DataGridViewCell)
UseColumnTextForButtonValue

셀이 표시하는 단추에 소유 열의 텍스트가 표시되는지 여부를 나타내는 값을 가져오거나 설정합니다.

Value

이 셀과 연결된 값을 가져오거나 설정합니다.

(다음에서 상속됨 DataGridViewCell)
ValueType

셀에 있는 값의 데이터 형식을 가져오거나 설정합니다.

Visible

셀이 숨겨진 행이나 열에 있는지 여부를 나타내는 값을 가져옵니다.

(다음에서 상속됨 DataGridViewCell)

메서드

Name Description
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()

셀의 문자열 표현을 반환합니다.

적용 대상

추가 정보