MailMergeSettingsBuilder.DataSource(Func<DataSourceFactory, SettingsOwnerBuilder>) Method

Sets a data source for Rich Text Editor’s mail merge functionality.

Namespace: DevExpress.AspNetCore.RichEdit

Assembly: DevExpress.AspNetCore.RichEdit.v21.1.dll

Declaration

public MailMergeSettingsBuilder DataSource(
    Func<DataSourceFactory, SettingsOwnerBuilder> configurator
)

Parameters

Name Type Description
configurator Func<DataSourceFactory, SettingsOwnerBuilder>

The data source configurator.

Returns

Type Description
MailMergeSettingsBuilder

An object that can be used to further configure the MailMerge settings.

Remarks

@(Html.DevExpress().RichEdit("richEdit")
    .Open("Documents/MailMergeTemplate.docx")
    .MailMerge(m => m
        .DataSource(d => d.Array().Data(SampleData.Companies))
        .ViewMergedData(true)
        .ActiveRecord(0)
    )
)
See Also