VGridControlBase.GetLast() Method

Returns the last row.

Namespace: DevExpress.XtraVerticalGrid

Assembly: DevExpress.XtraVerticalGrid.v20.1.dll

Declaration

public BaseRow GetLast()
Public Function GetLast As BaseRow

Returns

Type Description
BaseRow

A BaseRow descendant that represents the last row. null (Nothing in Visual Basic) if the vertical grid has no rows.

Remarks

The GetLast method accesses the control's VGridControlBase.Rows collection and returns the last element. To obtain the last visible row use the VGridControlBase.GetLastVisible method.

Examples

The following sample code demonstrates how to make visible all hidden category rows. The VGridControlBase.GetPrev and VGridControlBase.GetLast methods are used to traverse through the rows.

private void HideAllCategoryRows(){
   BaseRow row = vGridControl1.GetLast();
   while (row != null){
      if ((row is CategoryRow) && (row.Visible == false)){
         row.Visible = true;
      }
      row = vGridControl1.GetPrev(row);
   }
}
See Also