DataGridView.NewRowIndex 屬性

定義

取得新記錄的資料列之索引。

public:
 property int NewRowIndex { int get(); };
[System.ComponentModel.Browsable(false)]
public int NewRowIndex { get; }
[<System.ComponentModel.Browsable(false)>]
member this.NewRowIndex : int
Public ReadOnly Property NewRowIndex As Integer

屬性值

Int32

新記錄之資料列的索引;如果 AllowUserToAddRowsfalse,則為 -1。

屬性

備註

除非 AllowUserToAddRowsfalse ,否則此屬性的值等於 控制項中的資料列數目減 1。

適用於

另請參閱