DataGridViewRowCollection.GetFirstRow Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the first row in the collection that meets the specified criteria.
Overloads
GetFirstRow(DataGridViewElementStates) |
Returns the index of the first DataGridViewRow that meets the specified criteria. |
GetFirstRow(DataGridViewElementStates, DataGridViewElementStates) |
Returns the index of the first DataGridViewRow that meets the specified inclusion and exclusion criteria. |
GetFirstRow(DataGridViewElementStates)
Returns the index of the first DataGridViewRow that meets the specified criteria.
public:
int GetFirstRow(System::Windows::Forms::DataGridViewElementStates includeFilter);
public int GetFirstRow (System.Windows.Forms.DataGridViewElementStates includeFilter);
member this.GetFirstRow : System.Windows.Forms.DataGridViewElementStates -> int
Public Function GetFirstRow (includeFilter As DataGridViewElementStates) As Integer
Parameters
- includeFilter
- DataGridViewElementStates
A bitwise combination of DataGridViewElementStates values.
Returns
The index of the first 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.
See also
Applies to
GetFirstRow(DataGridViewElementStates, DataGridViewElementStates)
Returns the index of the first DataGridViewRow that meets the specified inclusion and exclusion criteria.
public:
int GetFirstRow(System::Windows::Forms::DataGridViewElementStates includeFilter, System::Windows::Forms::DataGridViewElementStates excludeFilter);
public int GetFirstRow (System.Windows.Forms.DataGridViewElementStates includeFilter, System.Windows.Forms.DataGridViewElementStates excludeFilter);
member this.GetFirstRow : System.Windows.Forms.DataGridViewElementStates * System.Windows.Forms.DataGridViewElementStates -> int
Public Function GetFirstRow (includeFilter As DataGridViewElementStates, excludeFilter As DataGridViewElementStates) As Integer
Parameters
- includeFilter
- DataGridViewElementStates
A bitwise combination of DataGridViewElementStates values.
- excludeFilter
- DataGridViewElementStates
A bitwise combination of DataGridViewElementStates values.
Returns
The index of the first 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.
See also
Applies to
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應