Skip to main content

TdxGanttControlViewSheetOptions.AddExtendedAttributeColumn(string) Method

Appends a custom field to a View sheet.

Declaration

function AddExtendedAttributeColumn(const AFieldName: string): TdxGanttControlSheetColumn;

Parameters

Name Type Description
AFieldName string

A customizable column name.

Returns

Type Description
TdxGanttControlSheetColumn

A customizable sheet column.

Remarks

Custom fields are sheet columns that store extra information about a task or resource.

custom-field-example

A field name defines the in-place editor type for column cells. The table below shows available field names and the corresponding in-place editors:

Field Name

In-Place Editor

Cost

Currency editor

Date

Date editor

Finish

Start

Flag

Check Box

Number

Spin Editor

Text

Text Editor

The control recognizes a column as a custom field if the following conditions are met:

  • A field index follows the field name (“Cost1”)
  • A field index is greater than zero

The code example below shows how to add the Completed column that can store the Boolean data type to the Chart View‘s task sheet:

var
  ACustomField: TdxGanttControlSheetColumn;
  ASheetOptions: TdxGanttControlChartViewSheetOptions;
begin
  ASheetOptions := dxGanttControl1.ViewChart.OptionsSheet;
  ACustomField := ASheetOptions.AddExtendedAttributeColumn('Flag1');
  ACustomField.Caption := 'Completed';
end;

Add Column at Runtime

A user should right-click a column header and choose “Insert Column” in the context menu.

column-header-popup-menu-insert-column

Note

The control‘s history does not store information about added columns.

See Also