Share via


Customize Control Binding Dialog Box

Use the Customize Control Binding dialog box to specify which controls are available for items in the Data Sources Window.

Each item in the Data Sources window has an associated list of controls that can be bound to the item. The controls available for each item are determined by the data type of the item. Each data type has a list of valid associated controls defined in this dialog box, including a default control.

Before you drag an item to a design surface to create a data-bound control, you can select which control to create. If you drag an item from the Data Sources window onto a design surface without selecting a control, the default control for the data type of the selected item is added to the design surface.

For more information about how to use this dialog box to customize the list of controls for items in the Data Sources window, see How to: Add Custom Controls to the Data Sources Window.

  • Data type
    Displays a list of types that you associate with controls:

    • Tables, entities, and objects are represented as [List] types.

    • Columns or public properties of entities and objects are represented as the actual data type of the column or property in the underlying data store.

    • Objects with user-defined shapes are represented as [Other]. For example, if your application has a custom control that displays data from more than one property of an object, select the [Other] data type for your control.

  • Associated controls
    Displays a list of controls that you can associate with a particular data type. If you want to associate a particular control with the data type selected in the Data Type list, select the corresponding check box. Clear the check box to remove an association. Checked controls appear in the shortcut menu presented by the Data Sources window for an item of the associated data type.

    You can add controls to the list by adding controls that have one of several data-binding attributes to the Toolbox. For more information, see How to: Add Custom Controls to the Data Sources Window.

  • Set Default
    Assigns the selected control type to be the default for items of the selected data type. The default control appears as the first selection in the shortcut menu presented by the Data Sources window for an item. Only one control type can be assigned as the default for a data type.

  • Clear Default
    Removes the designation of a control as the default for the selected data type. If there is no default for the selected data type, [None] appears as the first selection in the shortcut menu presented by the Data Sources window for an item of the associated type.

See Also

Tasks

How to: Add Custom Controls to the Data Sources Window

How to: Set the Control to be Created when Dragging from the Data Sources Window

Reference

Data Sources Window

Concepts

Data Sources Overview

Binding Windows Forms Controls to Data in Visual Studio