TcxCustomGridTableController.MakeItemVisible(TcxCustomGridTableItem) Method
Brings the specified data item into view.
Declaration
procedure MakeItemVisible(AItem: TcxCustomGridTableItem); virtual; abstract;
Parameters
Name | Type | Description |
---|---|---|
AItem | TcxCustomGridTableItem | The target data item. |
Remarks
In Table and Banded Table grid Views, when the OptionsView.ColumnAutoWidth property is set to False
, the total column width can be greater than the width of a View window. In this case, a horizontal scrollbar will appear thus enabling scrolling. To make a specific column visible, call the MakeItemVisible
procedure and pass a required column object as a parameter. Columns can be obtained from the View’s Items collection.
In Card Views, MakeItemVisible
just makes the currently focused record (card) visible.
The MakeFocusedItemVisible makes the focused item visible.
There are also another methods to scroll the View contents.
The Scroll method allows you to simulate user actions with scrollbars.
The TopRecordIndex property specifies the index of the topmost visible record and this enables scrolling.
The LeftPos property (available in (Banded) Table Views) allows you scroll horizontally by a specific amount of pixels.
These methods do not move focus when scrolling. To move focus to a specific item and record, use the FocusNextItem FocusNextRecord methods, and the TcxCustomGridTableItem.Focused and TcxCustomGridRecord.Focused properties.
In the following example, the tvCustomers View is scrolled to make the tvCustomersCity column visible: