DataGridViewRowCollection.GetNextRow 方法

定義

取得集合中符合指定準則的下一個資料列。

多載

GetNextRow(Int32, DataGridViewElementStates)

傳回下一個 DataGridViewRow 的索引,其符合指定的準則。

GetNextRow(Int32, DataGridViewElementStates, DataGridViewElementStates)

傳回符合指定的包含和排除準則之下一個 DataGridViewRow 的索引。

GetNextRow(Int32, DataGridViewElementStates)

傳回下一個 DataGridViewRow 的索引,其符合指定的準則。

public:
 int GetNextRow(int indexStart, System::Windows::Forms::DataGridViewElementStates includeFilter);
public int GetNextRow (int indexStart, System.Windows.Forms.DataGridViewElementStates includeFilter);
member this.GetNextRow : int * System.Windows.Forms.DataGridViewElementStates -> int
Public Function GetNextRow (indexStart As Integer, includeFilter As DataGridViewElementStates) As Integer

參數

indexStart
Int32

資料列的索引,其中此方法應該開始尋找下一個 DataGridViewRow

includeFilter
DataGridViewElementStates

DataGridViewElementStates 值的位元組合。

傳回

Int32

indexStart 之後第一個 DataGridViewRow 的索引,其具有 includeFilter 所指定的屬性,或者如果找不到任何資料列,則為 -1。

例外狀況

indexStart 小於 -1。

includeFilter 不是 DataGridViewElementStates 值的有效位元組合。

備註

方法 GetNextRow(Int32, DataGridViewElementStates) 會開始尋找符合準則的資料列,其開頭為位於 之後 indexStart 的資料列。

另請參閱

適用於

GetNextRow(Int32, DataGridViewElementStates, DataGridViewElementStates)

傳回符合指定的包含和排除準則之下一個 DataGridViewRow 的索引。

public:
 int GetNextRow(int indexStart, System::Windows::Forms::DataGridViewElementStates includeFilter, System::Windows::Forms::DataGridViewElementStates excludeFilter);
public int GetNextRow (int indexStart, System.Windows.Forms.DataGridViewElementStates includeFilter, System.Windows.Forms.DataGridViewElementStates excludeFilter);
member this.GetNextRow : int * System.Windows.Forms.DataGridViewElementStates * System.Windows.Forms.DataGridViewElementStates -> int
Public Function GetNextRow (indexStart As Integer, includeFilter As DataGridViewElementStates, excludeFilter As DataGridViewElementStates) As Integer

參數

indexStart
Int32

資料列的索引,其中此方法應該開始尋找下一個 DataGridViewRow

includeFilter
DataGridViewElementStates

DataGridViewElementStates 值的位元組合。

excludeFilter
DataGridViewElementStates

DataGridViewElementStates 值的位元組合。

傳回

Int32

下一個 DataGridViewRow 的索引,其具有 includeFilter 指定的屬性,但沒有 excludeFilter 指定的屬性;如果不找到任何資料列,則為 -1。

例外狀況

indexStart 小於 -1。

指定的篩選值之一或兩者都不是 DataGridViewElementStates 值的有效位元組合。

備註

方法 GetNextRow(Int32, DataGridViewElementStates, DataGridViewElementStates) 會開始尋找符合準則的資料列,其開頭為位於 之後 indexStart 的資料列。

另請參閱

適用於