mirror of
https://github.com/radzenhq/radzen-blazor.git
synced 2026-07-08 18:16:08 +00:00
22 lines
972 B
Plaintext
22 lines
972 B
Plaintext
@using RadzenBlazorDemos.Models.Northwind
|
|
|
|
@inherits DbContextPage
|
|
|
|
<RadzenStack Orientation="Orientation.Horizontal" AlignItems="AlignItems.Center" JustifyContent="JustifyContent.Center" Gap="0.5rem" class="rz-p-sm-12">
|
|
<RadzenLabel Text="Select Values" Component="DropDownMultipleMaxLabels" />
|
|
<RadzenDropDown @bind-Value=@values Data=@products TextProperty="@nameof(Product.ProductName)" ValueProperty="@nameof(Product.ProductID)" Name="DropDownMultipleMaxLabels"
|
|
Multiple=true AllowClear=true Placeholder="Select products"
|
|
MaxSelectedLabels="2" SelectAllText="Select all items" SelectedItemsText="are now selected" Style="width: 100%; max-width: 400px;" />
|
|
</RadzenStack>
|
|
|
|
@code {
|
|
IEnumerable<int> values = new int[] { 1, 2 };
|
|
IEnumerable<Product> products;
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
await base.OnInitializedAsync();
|
|
|
|
products = dbContext.Products;
|
|
}
|
|
} |