mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-07-08 18:16:08 +00:00
25 lines
812 B
Plaintext
25 lines
812 B
Plaintext
@using RadzenBlazorDemos.Data
|
|
@using RadzenBlazorDemos.Models.Northwind
|
|
@using Microsoft.EntityFrameworkCore
|
|
|
|
@inherits DbContextPage
|
|
|
|
<div class="rz-p-sm-12 rz-text-align-center">
|
|
<RadzenListBox AllowClear="true" @bind-Value=value AllowVirtualization="true"
|
|
AllowFiltering="true" Data=@customers TextProperty="@nameof(Customer.CompanyName)" ValueProperty="@nameof(Customer.CustomerID)" Style="width: 100%; max-width: 400px; height: 200px"
|
|
InputAttributes="@(new Dictionary<string,object>(){ { "aria-label", "select company" }})" />
|
|
</div>
|
|
|
|
|
|
@code {
|
|
string value;
|
|
IEnumerable<Customer> customers;
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
await base.OnInitializedAsync();
|
|
|
|
customers = dbContext.Customers.ToList();
|
|
}
|
|
}
|