Converts a column name in a
DataGridView
to a column index.
Namespace: CleanCode.Forms
Assembly: CleanCode (in CleanCode.dll) Version: 1.2.3.0 (1.2.03)
Syntax
public static int GetColumnIndex( DataGridView dataGridView, string columnName )
Parameters
- dataGridView
- Type:
System.Windows.Forms DataGridView
The DataGridView.
- columnName
- Type:
System String
Name of the column.
Return Value
Column index matching the column name, or -1 if not found.Remarks
See Also