DxListBox<TData, TValue>.ListRenderMode Property
Specifies how the List Box component renders its items.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.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, the component 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 List Box layout. If you bind the component to custom data, the component requests data in small chunks as the user scrolls up or down.
The List Box also displays the vertical scrollbar that allows users to navigate through data.
<DxListBox Data="@Data"
TData="Country"
TValue="Country"
ListRenderMode="ListRenderMode.Virtual">
</DxListBox>
@code {
IEnumerable<string> Data;
}