MemoFor

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

Implementation Details

MemoFor is realized by the MemoExtension class. Its instance can be accessed via the ExtensionsFactory<ModelType>.MemoFor<ValueType> helper method, which is used to add a MemoFor extension to a view. This first method's parameter is an expression that identifies model property to display and edit. The second method's parameter provides access to the MemoFor's settings, implemented by the MemoSettings class, allowing you to fully customize the extension.

MemoFor's client counterpart is represented by the ASPxClientMemo object.

Declaration

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

View code (Razor):

@Html.DevExpress().MemoFor(model => model.Notes,
    settings => {
        settings.Properties.Columns = 40;
        settings.Properties.Rows = 6;
    }).GetHtml()

The code result is demonstrated in the image below.

MVC_MemoFor_Declaration

See Also