Skip to main content
All docs
V26.1
  • Use Spreadsheet Documents in Business Objects

    • 2 minutes to read

    Note

    XAF does not support the Spreadsheet editor for ASP.NET Core Blazor applications.

    This topic describes how to use the SpreadsheetPropertyEditor to display byte array properties in WinForms applications. The following images demonstrate these Property Editors assigned to the Document.Data property:

    The SpreadsheetPropertyEditor in a WinForms application

    Assign the Spreadsheet Property Editor to a Business Class’ Property

    In Code

    Decorate a business class’ property with the EditorAliasAttribute and pass the SpreadsheetPropertyEditor value as the attribute’s parameter:

    using DevExpress.ExpressApp.Editors;
    using DevExpress.Persistent.Base;
    using DevExpress.Persistent.BaseImpl.EF;
    // ...
    [EditorAlias(EditorAliases.SpreadsheetPropertyEditor)] 
    public virtual byte[] Data { get; set; }
    
    // Make sure that you use options.UseChangeTrackingProxies() in your DbContext settings.
    

    In the Model Editor

    Navigate to the Views | <DetailView> | Items | <PropertyEditor> node and set the PropertyEditorType property to DevExpress.ExpressApp.Office.Win.SpreadsheetPropertyEditor.

    Spreadsheet Property Editor in Model Editor

    Edit the Document in a Separate Window

    Use the Show in popup context menu command to open the document in a new modal window.

    Show in popup context menu command

    Document in a Separate Window

    See Also