Syntax
object.ColPosition(index, number) [= value]
object.RowPosition(number) [= value]
Syntax for the ColPosition and RowPosition properties has these parts:
Part | Description |
object | An object expression that evaluates to an object in the Applies To list. |
index | A Long value that specifies the column to be moved. |
number | Optional. A Long value that specifies the band containing the column to be moved. |
value | Integer. A numeric expression that specifies the new position of the column or row. |
Remarks
In the ModHFGrid, when BandNumber is not specified, it defaults to zero. Hence, when the grid is not bound to a hierarchical Recordset, using zero for BandNumber and not specifying BandNumber both have the same result. Note that BandNumber is an optional parameter for backward compatibility with the MSFlexGrid.
The index and setting must correspond to valid row or column numbers (in the range zero to Rows – 1 or Cols – 1); otherwise, an error is generated.
When a row or column is moved using the RowPosition and ColPosition properties, all formatting information moves with it. This includes width, height, alignment, colors, and font properties. To move text only, use the Clip property.