DataGridViewRowCollection.Item Property (Int32)


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

Gets the DataGridViewRow at the specified index.

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

public DataGridViewRow this[
	int index
] { get; }


Type: System.Int32

The zero-based index of the DataGridViewRow to get.

Property Value

Type: System.Windows.Forms.DataGridViewRow

The DataGridViewRow at the specified index. Accessing a DataGridViewRow with this indexer causes the row to become unshared. To keep the row shared, use the SharedRow method. For more information, see Best Practices for Scaling the Windows Forms DataGridView Control.

Exception Condition

index is less than 0.

- or -

index is equal to or greater than Count.

.NET Framework
Available since 2.0
Return to top