Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

VGridControlBase.GetFirst() Method

Returns the first row within the VGridControlBase.Rows collection.

Namespace: DevExpress.XtraVerticalGrid

Assembly: DevExpress.XtraVerticalGrid.v24.2.dll

NuGet Packages: DevExpress.Win.Navigation, DevExpress.Win.VerticalGrid

#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