Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

show name instead of Id while using MudSelect and @bind-SelectedValues

$
0
0

i have the problem that when i have a dropdown in Blazor like this

<MudSelect T="Guid" Label="Items" MultiSelection="true" @bind-SelectedValues="selectedItemIds" Variant="Variant.Outlined" AnchorOrigin="Origin.BottomCenter"    Required RequiredError="select item">    @foreach (var item in items)    {<MudSelectItem T="Guid" Value="@item.id">@item.name</MudSelectItem></MudSelect>

when I have chosen the names of items I want they are displayed at the top but only there Ids and not there name, how can I fix so that the names are displayed instead of the Id. its for a form so I need the id for the post/put

Tried to mange so the selectedItemIds i used for a GetNames function so i have the name from the selectedItemIds but i cant find a way to display it


Viewing all articles
Browse latest Browse all 4839

Trending Articles