Skip to main content
All docs
V24.2

TreeListExportOptions.DocumentCulture Property

Specifies the exported document’s culture that defines numeric, date-time, and currency data formatting settings.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

public override CultureInfo DocumentCulture { get; set; }

Property Value

Type Description
CultureInfo

The document culture.

Remarks

The TreeList uses the current culture to format cell values in exported document. Use the DocumentCulture property to specify another culture for the exported document.

The following example changes date formatting in the exported document:

<DxButton Text="Export to XLSX" Click="ExportXlsx_Click" />

<DxTreeList Data="TreeListData" KeyFieldName="Id" ParentKeyFieldName="ParentId" @ref="MyTreeList">
    <Columns>
        <DxTreeListDataColumn FieldName="Name" Caption="Task" />
        <DxTreeListDataColumn FieldName="EmployeeName" />
        <DxTreeListDataColumn FieldName="StartDate" />
        <DxTreeListDataColumn FieldName="DueDate" />
    </Columns>
</DxTreeList>

@code {
    ITreeList MyTreeList { get; set; }

    async Task ExportXlsx_Click() {
        await MyTreeList.ExportToXlsxAsync("ExportResult", new TreeListXlExportOptions() {
            DocumentCulture = new System.Globalization.CultureInfo("fr-FR")
        });
    }
}

Date Formatting (Europe)

For more information about data export in the TreeList component, refer to the following topic: Export Data in Blazor TreeList.

See Also