Skip to main content

TcxDBEditorPropertiesCollection.Add Method

Creates a new data-aware item and adds it to the end of the TcxDBEditorPropertiesCollection collection.

Declaration

function Add: TcxDBEditorRowItemProperties;

Returns

Type
TcxDBEditorRowItemProperties

Remarks

The Add method creates a new data-aware item and adds it to the end of the collection. The Add method returns the new TcxDBEditorRowItemProperties item. The following code snippet demonstrates how you can do that:

//...
// Create the MPG City item, define type for data item and assign appropriate editor
with MultiEditorRow1.Properties.Editors.Add do
    begin
        DataBinding.ValueTypeClass := TcxIntegerValueType;
        EditPropertiesClass := TcxSpinEditProperties;
        Value := 16;
     Caption := 'MPG City';
    end;
//...
// Create the MPG Highway item, define type for data item and assign appropriate editor
with MultiEditorRow1.Properties.Editors.Add do
    begin
        DataBinding.ValueTypeClass := TcxIntegerValueType;
        EditPropertiesClass := TcxSpinEditProperties;
        Value := 23;
  Caption := 'MPG Highway';
    end;

When running this code the output will be:

See Also