Skip to main content
A newer version of this page is available. .

VGridControlBase.GetFirst() Method

Returns the first row within the VGridControlBase.Rows collection.

Namespace: DevExpress.XtraVerticalGrid

Assembly: DevExpress.XtraVerticalGrid.v18.2.dll

Declaration

public BaseRow GetFirst()

Returns

Type Description
BaseRow

A BaseRow descendant that represents the first element in the VGridControlBase.Rows collection. null (Nothing in Visual Basic) if the vertical grid has no rows.

Remarks

To get the first visible row use the VGridControlBase.GetFirstVisible method.

Example

The following sample code demonstrates how to traverse downwards through all rows within the VGridControl control. The VGridControlBase.GetFirst and VGridControlBase.GetNext methods are used for this purpose.

// obtaining the first row within the control
BaseRow row = vGridControl1.GetFirst();
while (row != null){
   // ...
   // perform the desired actions with the processed row
   // ...
   row = vGridControl1.GetNext(row);
}
See Also