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.GetNext(BaseRow) Method

Returns the row next to the specified one.

Namespace: DevExpress.XtraVerticalGrid

Assembly: DevExpress.XtraVerticalGrid.v24.2.dll

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

#Declaration

public BaseRow GetNext(
    BaseRow row
)

#Parameters

Name Type Description
row BaseRow

A BaseRow descendant that represents the row whose next row is returned.

#Returns

Type Description
BaseRow

A BaseRow descendant that represents the row next to the specified one.

#Remarks

The GetNext method gets the next row after the specified one. This can be especially useful when rows are arranged in a tree structure. This method returns a null (Nothing in Visual Basic) reference in the cases listed below:

  • the row specified as the parameter is a null reference or belongs to another vertical grid;
  • the row specified as the parameter is the last row.

#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