blazor-devexpress-dot-blazor-dot-dxmemosettings.md
Specifies how users can resize the memo.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(MemoResizeMode.Vertical)]
[Parameter]
public MemoResizeMode ResizeMode { get; set; }
| Type | Default | Description |
|---|---|---|
| MemoResizeMode | Vertical |
An enumeration value.
|
Available values:
| Name | Description |
|---|---|
| Disabled |
Users cannot resize the component.
| | Vertical |
Users can resize the component vertically.
| | Horizontal |
Users can resize the component horizontally.
| | Auto |
The Memo changes its height automatically based on content. Users cannot resize the component.
| | VerticalAndHorizontal |
Users can resize the component in both directions.
|
Use the ResizeMode property to specify how the Memo component can be resized.
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>
.my-memo-style{
font-style: italic;
}
public class EmployeeService {
public Task<Employee[]> GetData() {
List<Employee> employee = new List<Employee>();
employee.Add(new Employee() { ID = 00156, FirstName = "Nancy", LastName = "Davolio", BirthDate = new DateTime(1978, 08, 12), HireDate= new DateTime(2002, 10, 01), Notes = "Education includes a BA in psychology from Colorado State University. She also completed 'The Art of the Cold Call.' Nancy is a member of Toastmasters International."});
employee.Add(new Employee() { ID = 01200, FirstName = "Andrew", LastName = "Fuller", BirthDate = new DateTime(1974, 02, 11), HireDate = new DateTime(2002, 06, 21), Notes = "Andrew received his BTS commercial and a Ph.D. in international marketing from the University of Dallas. He is fluent in French and Italian and reads German. He joined the company as a sales representative, was promoted to sales manager and to vice president of sales. Andrew is a member of the Sales Management Roundtable, the Seattle Chamber of Commerce, and the Pacific Rim Importers Association."});
employee.Add(new Employee() { ID = 00567, FirstName = "Janet", LastName = "Leverling", BirthDate = new DateTime(1985, 06, 30), HireDate = new DateTime(2010, 07, 17), Notes = "Janet has a BS degree in chemistry from Boston College. She has also completed a certificate program in food retailing management. Janet was hired as a sales associate and promoted to sales representative."});
employee.Add(new Employee() { ID = 00168, FirstName = "Margaret", LastName = "Peacock", BirthDate = new DateTime(1990, 12, 25), HireDate = new DateTime(2014, 11, 09), Notes = "Margaret holds a BA in English literature from Concordia College and an MA from the American Institute of Culinary Arts. She was assigned to the London office temporarily from July through November 2015."});
employee.Add(new Employee() { ID = 01290, FirstName = "Steven", LastName = "Buchanan", BirthDate = new DateTime(1995, 03, 05), HireDate = new DateTime(2020, 01, 13), Notes = "Steven Buchanan graduated from St. Andrews University, Scotland, with a BSC degree. Upon joining the company as a sales representative, he spent 6 months in an orientation program at the Seattle office and then returned to his permanent post in London. He was promoted to sales manager in March 1993. Mr. Buchanan has completed the courses 'Successful Telemarketing' and 'International Sales Management'. He is fluent in French." });
employee.Add(new Employee() { ID = 00938, FirstName = "Michael", LastName = "Suyama", BirthDate = new DateTime(1987, 02, 28), HireDate = new DateTime(2018, 03, 22), Notes = "Michael is a graduate of Sussex University (MA, economics) and the University of California at Los Angeles (MBA, marketing). He has also taken the courses 'Multi-Cultural Selling' and 'Time Management for the Sales Professional.' He is fluent in Japanese and can read and write French, Portuguese, and Spanish."});
employee.Add(new Employee() { ID = 01098, FirstName = "Robert", LastName = "King", BirthDate = new DateTime(1992, 11, 08), HireDate = new DateTime(2018, 12, 15), Notes = "Robert King served in the Peace Corps and traveled extensively before completing his degree in English at the University of Michigan, the year he joined the company. After completing a course entitled 'Selling in Europe' he was transferred to the London office in March 2017."});
employee.Add(new Employee() { ID = 03027, FirstName = "Laura", LastName = "Callahan", BirthDate = new DateTime(1991, 10, 18), HireDate = new DateTime(2015, 11, 03), Notes = "Laura received a BA in psychology from the University of Washington. She has also completed a course in business French. She reads and writes French."});
employee.Add(new Employee() { ID = 00633, FirstName = "Anne", LastName = "Dodsworth", BirthDate = new DateTime(1983, 01, 21), HireDate = new DateTime(2004, 08, 21), Notes = "Anne has a BA degree in English from St. Lawrence College. She is fluent in French and German." });
return Task.FromResult(employee.ToArray());
}
}
public class Employee {
public int ID { get; set; }
public string? FirstName { get; set; }
public string? LastName { get; set; }
public DateTime? BirthDate { get; set; }
public DateTime? HireDate { get; set; }
public string? Notes { get; set; }
}
To change the resize mode at runtime, use the IMemoSettings.ResizeMode property instead.
See Also