TdxGanttControlViewSheetOptions.AddExtendedAttributeColumn(string) Method
In This Article
Appends a custom field to a View sheet.
#Declaration
Delphi
function AddExtendedAttributeColumn(const AFieldName: string): TdxGanttControlSheetColumn;
#Parameters
Name | Type | Description |
---|---|---|
AField |
string | A customizable column name. |
#Returns
Type | Description |
---|---|
Tdx |
A customizable sheet column. |
#Remarks
Custom fields are sheet columns that store extra information about a task or resource.
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 | |
Date | |
Finish | |
Start | |
Flag | |
Number | |
Text |
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.
See Also