Overview

Namespace: TheTechIdea.Beep.Winform.Controls.Design.Server.ActionLists
Inheritance: DesignerActionList | Visibility: public

DataControlActionList provides a reusable data-binding smart-tag for controls that support DataSource, DisplayMember, and ValueMember properties (ComboBox, ListBox, and similar data-bound controls). It uses the IBeepDesignerActionHost interface for property access, making it compatible with both leaf and container designers.

Smart-Tag Properties

PropertyTypeCategoryDescription
DataSourceobject?DataData source for the control. Get/set via _designer.GetProperty/SetProperty.
DisplayMemberstringDataProperty/column to display in the control. Delegates to _designer.
ValueMemberstringDataProperty/column to use as the selected value. Delegates to _designer.

All three properties are decorated with [Category("Data")] and descriptive [Description] attributes.

Data Actions

ActionDescription
ClearDataBinding()Sets DataSource to null, DisplayMember to string.Empty, and ValueMember to string.Empty. Use to unbind a control from its data source.

Smart-Tag Sections

SectionItems
Data BindingClearDataBinding (action)
Data PropertiesDataSource, DisplayMember, ValueMember (3 properties)

Examples

// At design time, a data-bound ComboBox shows:
// Smart-tag > Data Properties > DataSource = myBindingSource
// Smart-tag > Data Properties > DisplayMember = "Name"
// Smart-tag > Data Properties > ValueMember = "Id"
// Smart-tag > Data Binding > "Clear Data Binding"

// Equivalent at runtime:
combo.DataSource = customerList;
combo.DisplayMember = "FullName";
combo.ValueMember = "CustomerId";
// To clear:
combo.DataSource = null;
combo.DisplayMember = "";
combo.ValueMember = "";