| Quintiq file version 2.0 | 
| #parent: #root | 
| Method SyncRows | 
| { | 
|   TextBody: | 
|   [* | 
|     totalRows := 0; | 
|     totalColumns := this.Column( relsize ); | 
|      | 
|     if ( totalColumns > 0 ) { | 
|       randomCol := select( this, Column, tempFPC, true ); | 
|       totalRows := randomCol.Cell( relsize ); | 
|        | 
|       this.Row( relflush ); | 
|        | 
|       cells := construct( CustomerDemandIDSCells ); | 
|       traverse ( this, Column, fpc ) { | 
|         cells.Add( fpc.FirstCellInColumn() ); | 
|       } | 
|        | 
|       for ( i := 0; i < totalRows; i++ ) { | 
|         assert( selectvalues( cells, Elements, c, true, c.Column().Index() ).ToString( "" ) =  | 
|                 selectvalues( selectsortedset( cells, Elements, c, true, c.Column().Index() ), Elements, c, true, c.Column().Index() ).ToString( "" ), | 
|                 "Assertion error in FrockDataTable::syncRows: Cells not sorted by column index" ); | 
|         row := this.Row( relnew, RowNr := i ); | 
|          | 
|         newCells := construct( CustomerDemandIDSCells ); | 
|          | 
|         traverse ( cells, Elements, c ) { | 
|           row.Cell( relinsert, c ); | 
|            | 
|           newCells.Add( c.NextCellInColumn() ); | 
|         } | 
|          | 
|         cells := &newCells; | 
|       } | 
|     } | 
|   *] | 
| } |