Skip to main content

ObjectDataSource.DataMember Property

Specifies the data member of an object data source.

Namespace: DevExpress.DataAccess.ObjectBinding

Assembly: DevExpress.DataAccess.v24.2.dll

Declaration

[DefaultValue(null)]
public string DataMember { get; set; }

Property Value

Type Default Description
String null

A String value, specifying the data member.

Remarks

To bind the ObjectDataSource to an object, leave this property set to null. In the Data Source wizard, this scenario corresponds to the following option: “Do not select a member, bind to the entire object”.

To bind the ObjectDataSource to a property or method, assign its name to the DataMember property. When binding to a method, it is also required to specify this method’s ObjectDataSource.Parameters.

The following code snippets (auto-collected from DevExpress Examples) contain references to the DataMember 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