DataGridViewRowEventArgs.Row 속성


이벤트와 연결된 DataGridViewRow을 가져옵니다.Gets the DataGridViewRow associated with the event.

 property System::Windows::Forms::DataGridViewRow ^ Row { System::Windows::Forms::DataGridViewRow ^ get(); };
public System.Windows.Forms.DataGridViewRow Row { get; }
member this.Row : System.Windows.Forms.DataGridViewRow
Public ReadOnly Property Row As DataGridViewRow

속성 값

이벤트와 연결된 DataGridViewRow입니다.The DataGridViewRow associated with the event.


다음 코드 예제에서는이 형식의 사용을 보여 줍니다.The following code example illustrates the use of this type.

private void dataGridView1_DefaultValuesNeeded(object sender,
    System.Windows.Forms.DataGridViewRowEventArgs e)
    e.Row.Cells["Region"].Value = "WA";
    e.Row.Cells["City"].Value = "Redmond";
    e.Row.Cells["PostalCode"].Value = "98052-6399";
    e.Row.Cells["Country"].Value = "USA";
    e.Row.Cells["CustomerID"].Value = NewCustomerId();
Private Sub dataGridView1_DefaultValuesNeeded(ByVal sender As Object, _
    ByVal e As System.Windows.Forms.DataGridViewRowEventArgs) _
    Handles dataGridView1.DefaultValuesNeeded

    With e.Row
        .Cells("Region").Value = "WA"
        .Cells("City").Value = "Redmond"
        .Cells("PostalCode").Value = "98052-6399"
        .Cells("Country").Value = "USA"
        .Cells("CustomerID").Value = NewCustomerId()
    End With

End Sub

적용 대상

추가 정보