通过


DataGridView.CurrentRow 属性

定义

获取包含当前单元格的行。

public:
 property System::Windows::Forms::DataGridViewRow ^ CurrentRow { System::Windows::Forms::DataGridViewRow ^ get(); };
[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.DataGridViewRow CurrentRow { get; }
[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.DataGridViewRow? CurrentRow { get; }
[<System.ComponentModel.Browsable(false)>]
member this.CurrentRow : System.Windows.Forms.DataGridViewRow
Public ReadOnly Property CurrentRow As DataGridViewRow

属性值

表示 DataGridViewRow 包含当前单元格的行,或者 null 如果没有当前单元格。

属性

注解

若要更改当前行,必须将属性设置为 CurrentCell 所需行中的单元格。

适用于

另请参阅