Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DXRichEditMailMergeOptions.DataSource Property

Gets or sets the data source of a mail merge document. This is a dependency property.

Namespace: DevExpress.Xpf.RichEdit

Assembly: DevExpress.Xpf.RichEdit.v24.2.dll

NuGet Package: DevExpress.Wpf.RichEdit

#Declaration

public object DataSource { get; set; }

#Property Value

Type Description
Object

A Object value, specifying the document data source.

#Property Paths

You can access this nested property as listed below:

Object Type Path to DataSource
RichEditControl
.MailMergeOptions .DataSource

#Remarks

The following data source types are available:

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

When connecting to a data source that contains multiple data tables, specify the required data member by using the property.

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

#Example

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

using DevExpress.XtraRichEdit;
using System.Data;

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


richEditControl.Options.MailMerge.DataSource = xmlDataSet.Tables[0];
//...
See Also