Gets the index of the DataGridView row having
a specified value in a particular column (specified by name).
Namespace: CleanCode.FormsAssembly: CleanCode (in CleanCode.dll) Version: 1.2.3.0 (1.2.03)
Syntax
public static int GetMatchingRowIndex( DataGridView dataGridView, string columnName, string value )
Parameters
- dataGridView
- Type: System.Windows.Forms DataGridView
The DataGridView.
- columnName
- Type: System String
Name of the column to search.
- value
- Type: System String
The value to match.
Return Value
Matching row index, or -1 if not found.Remarks
See Also