Skip to main content

RowOperation.NeedsFullIteration Property

Gets a value indicating whether all rows or only parent rows are processed.

Namespace: DevExpress.XtraVerticalGrid.Rows

Assembly: DevExpress.XtraVerticalGrid.v22.1.dll

NuGet Package: DevExpress.Win.VerticalGrid


public virtual bool NeedsFullIteration { get; }

Property Value

Type Description

true if all rows must be processed by the operation; false if only rows that have children are to be processed.


As implemented in the RowOperation class, the NeedsFullIteration property is set to true. This implies that all rows are processed by the iterator. However there may be situations when you need to traverse through parent rows only. In this case you must set the NeedsFullIteration property to false in your operation class in order to omit rows that don’t have children. An example could be if you were using the iterator to expand or collapse all rows within a vertical grid control.

Note: rows for which the RowOperation.NeedsVisitChildren method returns false are omitted regardless of the NeedsFullIteration property value.


The following sample code demonstrates how to create an operation class that will collapse all rows that do not contain a specified row as their child. Thus, only the parent rows of the specified one will be expanded as a result.

The RowOperation.Execute method checks whether the processed row contains the specified row as a child. If not, the processed row is collapsed. The operation class also overrides the RowOperation.NeedsFullIteration property so as to process only parent rows.

public class CollapseExceptSpecifiedOperation : RowOperation {
   BaseRow visibleRow;
   public CollapseExceptSpecifiedOperation(BaseRow visibleRow) : base() {
      this.visibleRow = visibleRow;
   public override void Execute(BaseRow row) {
      if (!row.HasAsChild(visibleRow))
         row.Expanded = false;
   public override bool NeedsFullIteration { get { return false; } }
// ...
// collapsing all rows that do not contain the focused row as a child
  new CollapseExceptSpecifiedOperation(vGridControl1.FocusedRow));
See Also