Sign in Join
FPDoc Onlineexperiment

TGridColumns class

In unit Grids

Collection used to store column definitions for a grid control.

Declaration

pascal
TGridColumns = class(TCollection)

Inheritance

  1. TGridColumns
  2. TCollection
  3. TPersistent
  4. TObject

Descends from it: TDBGridColumns

Description

TGridColumns is a TCollection descendant that implements a container for column definitions used in TCustomGrid and descendent classes. TGridColumns is the type used to implement the Columns in TCustomGrid.

TGridColumns is used to create, access, and maintain TGridColumn class instances representing the columns in a grid. Use the indexed Items to access a TGridColumn instance in the collection using its ordinal position.

Additional properties and methods are included in the collection that are relevant to their use with grid column definitions. A reference to the TCustomGrid which owns the collection is maintained to provide access to the properties, methods, and events in the grid.

See also

Properties

GridpublicThe Grid which owns the collection and columns.
ItemspublicProvides indexed access to column definitions in the collection.
VisibleCountpublicThe number of visible columns in the collection.
EnabledpublicIndicates if the column collection is enabled.

Methods

GetOwnerprotectedReturns the owner of the component.
UpdateprotectedNotifies the Grid using the collection when a column is updated.
TitleFontChangedprotectedPerforms actions needed when the title font is changed for items in the collection.
FontChangedprotectedPerforms actions needed when the Font for the grid control is changed.
RemoveColumnprotectedRemoves the specified column number from the collection.
MoveColumnprotectedMoves the column from the first index to the second.
ExchangeColumnprotectedExchanges the positions for the specified columns.
InsertColumnprotectedInserts a column at the specified index position.
CreatepublicConstructor for the class instance.
AddpublicCreates a new ItemClass instance with the collection as its owner.
ClearpublicClears all items in the collection.
ColumnByTitlepublicGets the grid column in the collection with the specified title.
RealIndexpublicThe actual grid index for the visible columns in the collection.
IndexOfpublicGets the ordinal position in the collection for the specified column.
IsDefaultpublicTrue if the columns contain default values only.
HasIndexpublicTrue if the specified index value is valid for the collection.
VisibleIndexpublicThe visible index value for the specified column in the collection.

Inherited

From TCollection (26)

Assign BeginUpdate Changed Count Delete Destroy EndUpdate Exchange FindItemID GetAttr GetAttrCount GetEnumerator GetItem GetItemAttr GetNamePath Insert ItemClass Move Notify Owner PropName SetItem SetItemName SetPropName Sort UpdateCount

From TPersistent (5)

AssignTo DefineProperties FPOAttachObserver FPODetachObserver FPONotifyObservers

From TObject (40)

AfterConstruction BeforeDestruction CheckDisposed ClassInfo ClassName ClassNameIs ClassParent ClassType CleanupInstance DefaultHandler DefaultHandlerStr Dispatch DispatchStr Disposed DisposeOf Equals FieldAddress Free FreeInstance GetDisposed GetHashCode GetInterface GetInterfaceByStr GetInterfaceEntry GetInterfaceEntryByStr GetInterfaceTable GetInterfaceWeak GetLastCastErrorInfo InheritsFrom InitInstance InstanceSize MethodAddress MethodName newinstance QualifiedClassName SafeCallException StringMessageTable SystemHasExtendedRTTI ToString UnitName

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.