System.Windows.Forms.DataGridViewRowCollection Class

A collection of System.Windows.Forms.DataGridViewRow objects.

See Also: DataGridViewRowCollection Members

Syntax

[System.ComponentModel.ListBindable(false)]
[System.ComponentModel.Design.Serialization.DesignerSerializer("System.Windows.Forms.Design.DataGridViewRowCollectionCodeDomSerializer, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public class DataGridViewRowCollection : IList

Remarks

The System.Windows.Forms.DataGridViewRowCollection contains the System.Windows.Forms.DataGridViewRow objects in a System.Windows.Forms.DataGridView control. You can retrieve an instance of this class through the control DataGridView.Rows property. The collection maintains a reference to the control through the DataGridViewRowCollection.DataGridView property.

To improve performance, a System.Windows.Forms.DataGridViewRowCollection includes shared and unshared rows. Shared rows share memory to reduce the cost of a large record set. If your record set is very large, you should be careful to keep the rows shared as much as possible.

For more information, see Best Practices for Scaling the Windows Forms DataGridView Control.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0