ComponentOne List 8.0 for ActiveX
Order Property

 

Order Property

This property sets or returns the zero-based display position of a column within the Columns collection.

Syntax

column.Order= integer

Remarks

Read/Write at run time and design time.

Property applies to Column object.

Use the Order property to determine the location of a column relative to other columns within the same split, subject to end-user move operations. If AllowColMove is never set to True, then this property returns the same value as ColIndex.

You can also set the Order property in code to move a single unselected column or all selected columns. For example, consider a control with four columns. To move the last column (index 3) all the way to the left, you would code:

TDBList1.Columns(3).Order = 0

To reverse this action, you would set the order to the number of columns:

TDBList1.Columns(3).Order = TDBList1.Columns.Count

Note that you still use index 3 to refer to the original last column even after it has been moved. This allows code that references columns by numeric index instead of by name to remain consistent, which is especially critical for unbound mode applications.

Note: If one or more columns are selected, then setting the Order property of an unselected column has no effect. However, setting the Order property of a selected column moves all columns in the selected range.

See Also

Column Object, Columns Collection

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback