mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-07-08 18:16:08 +00:00
24 lines
898 B
Plaintext
24 lines
898 B
Plaintext
@using RadzenBlazorDemos.Data
|
|
@using RadzenBlazorDemos.Models.Northwind
|
|
@using Microsoft.EntityFrameworkCore
|
|
|
|
@inherits DbContextPage
|
|
|
|
<RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.Center" Gap="0.5rem" class="rz-p-sm-12">
|
|
<RadzenLabel Text="Select Value" Component="DropDownVirtualization" />
|
|
<RadzenDropDown AllowClear="true" @bind-Value=value AllowVirtualization="true" Name="DropDownVirtualization"
|
|
AllowFiltering="true" Data=@customers TextProperty="@nameof(Customer.CompanyName)" ValueProperty="@nameof(Customer.CustomerID)" Style="width: 100%; max-width: 400px;" />
|
|
</RadzenStack>
|
|
|
|
@code {
|
|
string value;
|
|
IEnumerable<Customer> customers;
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
await base.OnInitializedAsync();
|
|
|
|
customers = dbContext.Customers.ToList();
|
|
}
|
|
}
|