Back to Devexpress

VGridControlBase.GetNext(BaseRow) Method

windowsforms-devexpress-dot-xtraverticalgrid-dot-vgridcontrolbase-dot-getnext-x28-devexpress-dot-xtraverticalgrid-dot-rows-dot-baserow-x29.md

latest3.3 KB
Original Source

VGridControlBase.GetNext(BaseRow) Method

Returns the row next to the specified one.

Namespace : DevExpress.XtraVerticalGrid

Assembly : DevExpress.XtraVerticalGrid.v25.2.dll

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

Declaration

csharp
public BaseRow GetNext(
    BaseRow row
)
vb
Public Function GetNext(
    row As BaseRow
) As BaseRow

Parameters

NameTypeDescription
rowBaseRow

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

|

Returns

TypeDescription
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.

csharp
// 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);
}
vb
' obtaining the first row within the control
Dim row As BaseRow = VGridControl1.GetFirst()
While Not row Is Nothing
   ' ...
   ' perform the desired actions with the processed row
   ' ...
   row = VGridControl1.GetNext(row)
End While

See Also

GetFirst()

GetPrev(BaseRow)

GetLast()

Cells

VGridControlBase Class

VGridControlBase Members

DevExpress.XtraVerticalGrid Namespace