次の方法で共有


LockColumnsLeft Property

Specifies the number of columns to lock in the left panel of a grid, beginning at the left edge. Read/write at design and run time.

Locked columns remain in the Grid or Browse window when tabbing to the right. LockColumnsLeft applies only to the left grid panel, which is not displayed by default. After LockColumns is set, the ability to move columns is disabled.

Grid.LockColumnsLeft [ = nValue ]

Parameters

  • nValue
    Numeric data type. Specifies a number of columns to lock in the left panel of a grid. The default value is 0. If nValue is greater than 0, setting nValue to 0 removes the current number of columns locked.

Remarks

A column separator line, which appears 1 pixel wider than the line separating the other columns, indicates the area where the locked columns end and the normal columns begin.

To lock columns in the right panel of the grid, use the LockColumns property.

Example

The following example demonstrates how to use LockColumnsLeft with BROWSE...NAME:

CLOSE DATABASES
OPEN DATABASE testdata && Open testdata database in \Samples\Data.
USE Customer
BROWSE NAME Customer
Customer.LockColumnsLeft = 2 && Locks first two columns in left pane.

See Also

Properties | LockColumns Property | Locking Columns

Applies To: Grid Control | BROWSE...NAME Command