Back to Devexpress

RichEditMailMergeOptions.DataMember Property

officefileapi-devexpress-dot-xtrarichedit-dot-richeditmailmergeoptions-cbca51ad.md

latest3.4 KB
Original Source

RichEditMailMergeOptions.DataMember Property

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

Declaration

csharp
[DefaultValue("")]
public virtual string DataMember { get; set; }
vb
<DefaultValue("")>
Public Overridable Property DataMember As String

Property Value

TypeDefaultDescription
StringString.Empty

The data member name.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to DataMember
RichEditControlOptionsBase

.MailMerge .DataMember

|

Remarks

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

csharp
productRichEdit.Options.MailMerge.DataSource = ds;
productRichEdit.Options.MailMerge.DataMember = "Products";

word-document-api-create-master-detail-report/VB/MergeProcessor.vb#L43

vb
productRichEdit.Options.MailMerge.DataSource = ds
productRichEdit.Options.MailMerge.DataMember = "Products"
ordersRichEdit.LoadDocument("detaildetail.rtf")

See Also

DataSource

RichEditMailMergeOptions Class

RichEditMailMergeOptions Members

DevExpress.XtraRichEdit Namespace