IDataGridColumn.EditorBinding

Syntax

EditorBinding: String;

Description

The EditorBinding property determines the values editor syntax for the current column cells.

Comments

The binding string that determines parameters of the editor should be set as value of the property. To get the binding string, use the IBindingValue.AsString property.

Example

Executing the example requires a form with the Button1 button and the DataGrid component named DataGrid1. The table contains at least one column.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    BM: IBindingManager;
    ComboBoxBinding: IBindingComboBox;
Begin
    BM := New BindingManager.Create;
    ComboBoxBinding := BM.CreateByUi("ComboBox"As IBindingComboBox;
    //Elements
    ComboBoxBinding.Items := "1;2;3;4;5";
    //Ability to edit
    ComboBoxBinding.ListMode := False;
    //Delimiter for elements
    ComboBoxBinding.Separators := ";";
    //Default value
    ComboBoxBinding.Value := "3";
    //Setting of editor
    DataGrid1.Columns.Item(0).EditorBinding := ComboBoxBinding.AsString;
End Sub Button1OnClick;

Clicking the button sets the editor, which will be used top set cell values, for the first table column. A combobox to choose values from 1 to 5 is used as the editor.

See also:

IDataGridColumn