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

Any solution when @bind-Value and ValueChanged don't work together?

$
0
0

I have a Data Grid that when selecting a row, that row will be saved as an rSelect object with @bind-Value. To be able to edit the object, I @bind-ValuerSelect with select, where each selection has an id value but displays a name. Now I want it to display the id and the name of the object with that id to be displayed in the MudField below. After consulting the documentation I decided to use ValueChanged but it cannot run with @bind-Value, what should I do?

<MudItem xs="6" md="6"><MudSelect T="string" ReadOnly="@_readonly" Dense="true" @bind-Value="@rSelect.Manvcongno" Label="ID" Variant="Variant.Outlined">        @foreach(var nv in nhanviens)        {<MudSelectItem Value="@nv.id">@nv.Name</MudSelectItem>        }</MudSelect></MudItem><MudItem xs="6" md="6"><MudField Variant="Variant.Outlined" Label="Name"></MudField></MudItem>

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>