officefileapi-devexpress-dot-xtrarichedit-dot-richeditmailmergeoptions-cbca51ad.md
Specifies the member of a mail merge document‘s data source.
Namespace : DevExpress.XtraRichEdit
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
[DefaultValue("")]
public virtual string DataMember { get; set; }
<DefaultValue("")>
Public Overridable Property DataMember As String
| Type | Default | Description |
|---|---|---|
| String | String.Empty |
The data member name.
|
You can access this nested property as listed below:
| Object Type | Path to DataMember |
|---|---|
| RichEditControlOptionsBase |
.MailMerge .DataMember
|
Specify the DataMember property if a dataset used in a mail merge data source (set as the RichEditMailMergeOptions.DataSource property value) contains multiple data tables.
The DataMember is ignored when the document data source is a data table, data view, or a custom object.
The following code snippet (auto-collected from DevExpress Examples) contains a reference 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.
word-document-api-create-master-detail-report/CS/MergeProcessor.cs#L44
productRichEdit.Options.MailMerge.DataSource = ds;
productRichEdit.Options.MailMerge.DataMember = "Products";
word-document-api-create-master-detail-report/VB/MergeProcessor.vb#L43
productRichEdit.Options.MailMerge.DataSource = ds
productRichEdit.Options.MailMerge.DataMember = "Products"
ordersRichEdit.LoadDocument("detaildetail.rtf")
See Also
RichEditMailMergeOptions Class