DataGridViewRowCollection.GetNextRow 方法

定义

获取集合中符合指定条件的下一行。Gets the next row in the collection that meets the specified criteria.

重载

GetNextRow(Int32, DataGridViewElementStates)

返回满足指定条件的下一个 DataGridViewRow 的索引。Returns the index of the next DataGridViewRow that meets the specified criteria.

GetNextRow(Int32, DataGridViewElementStates, DataGridViewElementStates)

返回下一个满足指定包含和排除条件的 DataGridViewRow 的索引。Returns the index of the next DataGridViewRow that meets the specified inclusion and exclusion criteria.

GetNextRow(Int32, DataGridViewElementStates)

返回满足指定条件的下一个 DataGridViewRow 的索引。Returns the index of the next DataGridViewRow that meets the specified criteria.

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 的行的索引。The index of the row where the method should begin to look for the next DataGridViewRow.

includeFilter
DataGridViewElementStates

DataGridViewElementStates 值的按位组合。A bitwise combination of DataGridViewElementStates values.

返回

DataGridViewRow 后面的具有由 indexStart 指定的属性的第一个 includeFilter 的索引;如果未找到任何行,则为 -1。The index of the first DataGridViewRow after indexStart that has the attributes specified by includeFilter, or -1 if no row is found.

异常

indexStart 小于 -1。indexStart is less than -1.

includeFilter 不是 DataGridViewElementStates 值的有效按位组合。includeFilter is not a valid bitwise combination of DataGridViewElementStates values.

注解

GetNextRow(Int32, DataGridViewElementStates) 方法开始查找匹配条件的行,该行从 indexStart之后的行开始。The GetNextRow(Int32, DataGridViewElementStates) method begins looking for the row that matches the criteria starting with the row positioned after indexStart.

另请参阅

GetNextRow(Int32, DataGridViewElementStates, DataGridViewElementStates)

返回下一个满足指定包含和排除条件的 DataGridViewRow 的索引。Returns the index of the next DataGridViewRow that meets the specified inclusion and exclusion criteria.

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 的行的索引。The index of the row where the method should begin to look for the next DataGridViewRow.

includeFilter
DataGridViewElementStates

DataGridViewElementStates 值的按位组合。A bitwise combination of DataGridViewElementStates values.

excludeFilter
DataGridViewElementStates

DataGridViewElementStates 值的按位组合。A bitwise combination of DataGridViewElementStates values.

返回

具有 DataGridViewRow 指定的特性,而没有 includeFilter 指定的特性的下一个 excludeFilter 的索引;如果找不到任何行,则为 -1。The index of the next DataGridViewRow that has the attributes specified by includeFilter, and does not have the attributes specified by excludeFilter; -1 if no row is found.

异常

indexStart 小于 -1。indexStart is less than -1.

一个或两个指定的筛选器值不是有效的 DataGridViewElementStates 值按位组合。One or both of the specified filter values is not a valid bitwise combination of DataGridViewElementStates values.

注解

GetNextRow(Int32, DataGridViewElementStates, DataGridViewElementStates) 方法开始查找匹配条件的行,该行从 indexStart之后的行开始。The GetNextRow(Int32, DataGridViewElementStates, DataGridViewElementStates) method begins looking for the row that matches the criteria starting with the row positioned after indexStart.

另请参阅

适用于