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.1.dll
NuGet Package: DevExpress.Wpf.RichEdit
Declaration
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 |
|
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