IndexOf Method

DataGridViewRowCollection.IndexOf Method (DataGridViewRow)


Returns the index of a specified item in the collection.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public int IndexOf(
	DataGridViewRow dataGridViewRow


Type: System.Windows.Forms.DataGridViewRow

The DataGridViewRow to locate in the DataGridViewRowCollection.

Return Value

Type: System.Int32

The index of value if it is a DataGridViewRow found in the DataGridViewRowCollection; otherwise, -1.

.NET Framework
Available since 2.0
Return to top
© 2015 Microsoft