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

    Specifies the number of visible text lines in the Memo.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.2.dll

    NuGet Package: DevExpress.Blazor

    Declaration

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

    Property Value

    Type Default Description
    Int32 2

    The number of visible text lines.

    Remarks

    Use the Rows property to specify the number of visible text lines in the memo. When content exceeds the specified number of lines, the Memo displays a vertical scrollbar.

    Note

    We recommend that you use the memo editor in 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
    
    <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