Skip to main content
All docs
V25.1
  • MergeMode Enum

    Lists delimiters that start a new merged range.

    Namespace: DevExpress.Blazor.RichEdit

    Assembly: DevExpress.Blazor.RichEdit.v25.1.dll

    NuGet Package: DevExpress.Blazor.RichEdit

    Declaration

    public enum MergeMode

    Members

    Name Description
    NewParagraph

    Separates merged ranges with paragraphs.

    NewSection

    Separates merged ranges with sections. The control obtains the section break type from the previous section break or sets it to NextPage. Use this option if your document template contains headers or footers.

    Remarks

    The following code snippet executes a mail merge operation and loads the resulting document to the Rich Text Editor:

    <DxRichEdit @ref=richEdit>
       <MailMergeSettings>
            <DxMailMergeSettings Data="@DataSource" ViewMergedData="true" ActiveRecord="1"/>
        </MailMergeSettings>
    </DxRichEdit>
    
    @code {
        IEnumerable<Employee> DataSource;
        protected override async Task OnInitializedAsync() {
            DataSource = await NwindDataService.GetEmployeesAsync();
            await base.OnInitializedAsync();
        }   
        async void ExecuteMailMerge() { 
            byte[] result = await richEdit.DocumentAPI.MailMergeAsync(DocumentFormat.OpenXml);
            await richEdit.LoadDocumentAsync(result, DocumentFormat.OpenXml);
        }
        @* ... *@
    }
    
    using System;
    using System.Collections.Generic;
    using System.Runtime.InteropServices;
    namespace BlazorDemo.Data.Northwind {
        public partial class Employee {
            public Employee() {
                this.Orders = new List<Order>();
            }
            public int EmployeeId { get; set; }
            public string LastName { get; set; }
            public string FirstName { get; set; }
            public string Title { get; set; }
            public string TitleOfCourtesy { get; set; }
            public Nullable<System.DateTime> BirthDate { get; set; }
            public Nullable<System.DateTime> HireDate { get; set; }
            public string Address { get; set; }
            public string City { get; set; }
            public string Region { get; set; }
            public string PostalCode { get; set; }
            public string Country { get; set; }
            public string HomePhone { get; set; }
            public string Extension { get; set; }
            public string Notes { get; set; }
            public Nullable<int> ReportsTo { get; set; }
            public string PhotoPath { get; set; }
            public virtual ICollection<Order> Orders { get; set; }
            public string Text => $"{FirstName} {LastName} ({Title})";
            public string ImageFileName => $"Employees/{EmployeeId}.jpg";
        }
    }
    
    See Also