DxListEditorBase<TData, TValue>.ListRenderMode Property
Specifies how the list editor renders its items.
Namespace: DevExpress.Blazor.Base
Assembly: DevExpress.Blazor.v24.2.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public ListRenderMode ListRenderMode { get; set; }
Property Value
Type | Description |
---|---|
ListRenderMode | A ListRenderMode enumeration value. |
Available values:
Name | Description |
---|---|
Entire | The editor renders the entire item list. Use this option for small item lists where scrolling should be instant. |
Virtual | The editor renders list items only after they appear in the viewport. This approach improves performance when the list contains many items. |
Remarks
Set the ListRenderMode
property to ListRenderMode.Virtual to enable virtual scrolling. In this mode, a list editor (ComboBox, List Box, TagBox) renders all rows that are in the viewport and several rows above and below that viewport. The additional row count depends on the bound data source and editor layout. If you bind the editor to custom data, the editor requests data in small chunks as the user scrolls up or down.
The list editor also displays the vertical scrollbar that allows users to navigate through data.
The following code enables virtual render mode for the List Box component.
<DxListBox Data="@Data"
TData="Country"
TValue="Country"
ListRenderMode="ListRenderMode.Virtual">
</DxListBox>
@code {
IEnumerable<string> Data;
}