All docs
V20.1
20.2 (EAP/Beta)
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

EditFormEventArgsBase.BindableControls Property

Provides access to the collection of controls used to edit the processed data record. Controls are indexed by field names or grid columns.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

public EditFormBindableControlsCollection BindableControls { get; }
Public ReadOnly Property BindableControls As EditFormBindableControlsCollection

Property Value

Type Description
DevExpress.XtraGrid.EditForm.Helpers.EditFormBindableControlsCollection

An object that specifies the collection of controls used to edit the processed data record.

Remarks

To retrieve an editor for a particular field/column, use the corresponding GridColumn.FieldName property value or the corresponding GridColumn object.


private void gridView1_EditFormPrepared(object sender, DevExpress.XtraGrid.Views.Grid.EditFormPreparedEventArgs e) {
    Control colCityEditor = e.BindableControls[colCity];
    Control colAddressEditor = e.BindableControls["Address"];
    //..
}

Examples

When the Edit Form is displayed, focus moves to the first editor within the Edit Form. The following example shows how to handle the GridView.EditFormPrepared event to set focus to an editor corresponding to the focused GridColumn.

public partial class Form1 : Form {
    public Form1() {
        InitializeComponent();
        gridView1.EditFormPrepared += gridView1_EditFormPrepared;
    }

    private void gridView1_EditFormPrepared(object sender, DevExpress.XtraGrid.Views.Grid.EditFormPreparedEventArgs e) {
        GridView view = sender as GridView;
        if (e.BindableControls[view.FocusedColumn] != null)
            e.FocusField(view.FocusedColumn);
    }
}
See Also