Skip to main content
A newer version of this page is available. .

Overview - Memo

  • 2 minutes to read

Memo is an editor allowing multi-line text to be displayed and edited.

Implementation Details

Memo is realized by the MemoExtension class. Its instance can be accessed via the ExtensionsFactory.Memo helper method, which is used to add a Memo extension to a view. This method’s parameter provides access to the Memo‘s settings, implemented by the MemoSettings class, allowing you to fully customize the extension.

Memo‘s client counterpart is represented by the ASPxClientMemo object.

Declaration

Memo can be added to a view in the following manner.

View code (ASPX):

<% 
    Html.DevExpress().Memo(
        settings => {
            settings.Name = "memo1";

            settings.Text = "The editor's size can be controlled either by its Width and Height properties or, if they are not defined, by using the Columns and Rows properties.";

            settings.Properties.Columns = 40;
            settings.Properties.Rows = 6;
        }
    )
    .Render();
%>

View code (Razor):

@Html.DevExpress().Memo(
    settings => {
        settings.Name = "memo1";

        settings.Text = "The editor's size can be controlled either by its Width and Height properties or, if they are not defined, by using the Columns and Rows properties.";

        settings.Properties.Columns = 40;
        settings.Properties.Rows = 6;
    }).GetHtml()

Note

The Partial View should contain only the extension’s code.

The code result is demonstrated in the image below.

memo-declaration.png

See Also