Skip to main content
All docs
V25.1
  • DxMemoSettings.Rows Property

    Specifies the number of text lines in the memo.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [DefaultValue(2)]
    [Parameter]
    public int Rows { get; set; }

    Property Value

    Type Default Description
    Int32 2

    The number of text lines.

    Remarks

    Use the Rows property to specify the number of text lines in the memo. If the text does not fit the specified number of lines, the component displays a scrollbar.

    Note

    We recommend that you use the memo editor in the inline or pop-up edit form only. In the edited row, the memo can stretch row height and thus make the layout inconsistent.

    @inject EmployeeService EmployeeData
    
    <style>
        .my-memo-style{
            font-style: italic;
        }
    </style>
    
    <DxGrid Data="@employees" PageSize="4" KeyFieldName="ID"
            EditMode="GridEditMode.EditForm">
        <Columns>
            <DxGridCommandColumn />
            <DxGridDataColumn FieldName="FirstName" />
            <DxGridDataColumn FieldName="LastName" />
            <DxGridDataColumn FieldName="BirthDate" />
            <DxGridDataColumn FieldName="HireDate" />
            <DxGridDataColumn FieldName="Notes" Visible="false" >
                <EditSettings>
                    <DxMemoSettings Rows="3" 
                                    TextAreaCssClass="my-memo-style" 
                                    ResizeMode="MemoResizeMode.Disabled" />
                </EditSettings>
            </DxGridDataColumn>
        </Columns>
        <EditFormTemplate Context="EditFormContext">
            <DxFormLayout >
                <DxFormLayoutItem Caption="First Name:" ColSpanMd="6">
                    @EditFormContext.GetEditor("FirstName")
                </DxFormLayoutItem>
                <DxFormLayoutItem Caption="Last Name:" ColSpanMd="6">
                    @EditFormContext.GetEditor("LastName")
                </DxFormLayoutItem>
                <DxFormLayoutItem Caption="Birth Date:" ColSpanMd="6">
                    @EditFormContext.GetEditor("BirthDate")
                </DxFormLayoutItem>
                <DxFormLayoutItem Caption="Hire Date:" ColSpanMd="6">
                    @EditFormContext.GetEditor("HireDate")
                </DxFormLayoutItem>
                <DxFormLayoutItem Caption="Notes:" ColSpanMd="12">
                    @EditFormContext.GetEditor("Notes")
                </DxFormLayoutItem>
            </DxFormLayout>
        </EditFormTemplate>
    </DxGrid>
    

    Edit form with memo

    If the ResizeMode property is set to Vertical or VerticalAndHorizontal, users can resize the editor vertically to change the number of lines.

    To change the number of rows at runtime, use the IMemoSettings.Rows property instead.

    Implements

    See Also