Skip to main content
A newer version of this page is available. .

BaseListBoxControl.ValueMember Property

Gets or sets the field name in the bound data source whose contents are assigned to item values.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v19.1.dll

Declaration

[DefaultValue("")]
[DXCategory("Data")]
public virtual string ValueMember { get; set; }

Property Value

Type Default Description
String String.Empty

A string value specifying a field name in the data source.

Remarks

This property is in effect when a list box control is bound to a data source via the BaseListBoxControl.DataSource property.

You can optionally specify the ValueMember property for your own purposes. For instance, you can specify this property in order to subsequently get this field’s values for list box items via the BaseListBoxControl.GetItemValue method.

Values of the field specified by the ValueMember property are never displayed.

To specify the field whose values are displayed in the list box control, use the BaseListBoxControl.DisplayMember property.

Changing the ValueMember property value at runtime raises the BaseListBoxControl.ValueMemberChanged event.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ValueMember property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also