Skip to main content

RichEditMailMergeOptions.DataSource Property

Specifies the data source of a mail merge document.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.RichEdit.v23.2.Core.dll

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation


public virtual object DataSource { get; set; }

Property Value

Type Default Description
Object null

The data source.

Property Paths

You can access this nested property as listed below:

Object Type Path to DataSource
.MailMerge .DataSource


The following data source types are available:

  • System.Collections.IList
  • System.Collections.ArrayList
  • System.Data.DataTable

When a data source contains multiple data tables, use the RichEditMailMergeOptions.DataMember property to specify the required data member.


The code sample below shows how to use the XML data source:

using DevExpress.XtraRichEdit;
using System.Data;

DataSet xmlDataSet = new DataSet();
xmlDataSet.Tables[0].PrimaryKey = new DataColumn[] {
     xmlDataSet.Tables[0].Columns[0] };

using (var wordProcessor = new RichEditDocumentServer())
    wordProcessor.Options.MailMerge.DataSource = xmlDataSet.Tables[0];

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


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