DataGridViewCellCollection.IndexOf Method (DataGridViewCell)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns the index of the specified cell.

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

public int IndexOf(
	DataGridViewCell dataGridViewCell
)

Parameters

dataGridViewCell
Type: System.Windows.Forms.DataGridViewCell

The cell to locate in the collection.

Return Value

Type: System.Int32

The zero-based index of the value of dataGridViewCell parameter, if it is found in the collection; otherwise, -1.

.NET Framework
Available since 2.0
Return to top
Show: