DataGridViewRowCollection.GetPreviousRow DataGridViewRowCollection.GetPreviousRow DataGridViewRowCollection.GetPreviousRow DataGridViewRowCollection.GetPreviousRow Method

Definition

Gets the previous row in the collection that meets the specified criteria.

Overloads

GetPreviousRow(Int32, DataGridViewElementStates) GetPreviousRow(Int32, DataGridViewElementStates) GetPreviousRow(Int32, DataGridViewElementStates) GetPreviousRow(Int32, DataGridViewElementStates)

Returns the index of the previous DataGridViewRow that meets the specified criteria.

GetPreviousRow(Int32, DataGridViewElementStates, DataGridViewElementStates) GetPreviousRow(Int32, DataGridViewElementStates, DataGridViewElementStates) GetPreviousRow(Int32, DataGridViewElementStates, DataGridViewElementStates) GetPreviousRow(Int32, DataGridViewElementStates, DataGridViewElementStates)

Returns the index of the previous DataGridViewRow that meets the specified inclusion and exclusion criteria.

GetPreviousRow(Int32, DataGridViewElementStates) GetPreviousRow(Int32, DataGridViewElementStates) GetPreviousRow(Int32, DataGridViewElementStates) GetPreviousRow(Int32, DataGridViewElementStates)

Returns the index of the previous DataGridViewRow that meets the specified criteria.

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

Parameters

indexStart
Int32 Int32 Int32 Int32

The index of the row where the method should begin to look for the previous DataGridViewRow.

Returns

The index of the previous DataGridViewRow that has the attributes specified by includeFilter; -1 if no row is found.

Exceptions

includeFilter is not a valid bitwise combination of DataGridViewElementStates values.

Remarks

The GetPreviousRow(Int32, DataGridViewElementStates) method begins looking for the row that matches the criteria starting with the row positioned before indexStart.

See also

GetPreviousRow(Int32, DataGridViewElementStates, DataGridViewElementStates) GetPreviousRow(Int32, DataGridViewElementStates, DataGridViewElementStates) GetPreviousRow(Int32, DataGridViewElementStates, DataGridViewElementStates) GetPreviousRow(Int32, DataGridViewElementStates, DataGridViewElementStates)

Returns the index of the previous DataGridViewRow that meets the specified inclusion and exclusion criteria.

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

Parameters

indexStart
Int32 Int32 Int32 Int32

The index of the row where the method should begin to look for the previous DataGridViewRow.

Returns

The index of the previous DataGridViewRow that has the attributes specified by includeFilter, and does not have the attributes specified by excludeFilter; -1 if no row is found.

Exceptions

One or both of the specified filter values is not a valid bitwise combination of DataGridViewElementStates values.

Remarks

The GetPreviousRow(Int32, DataGridViewElementStates, DataGridViewElementStates) method begins looking for the row that matches the criteria starting with the row positioned before indexStart.

See also

Applies to