I have a Telerik grid and am using inline editing. On edit, I have a select dropdown list for the user to select the option that he needs. In my view model if the user is in edit mode I would like for the drop down to have the selected value. It doesn't seem to work properly. Here is the column in my grid:
<GridColumn Field=@nameof(JobAssignmentListViewModel.Trade) Title="Trade" FieldType="@typeof(string)"><EditorTemplate><select id="tradeList" class="form-select" value="@(context as JobAssignmentListViewModel).TradeId" @onchange="@(e => UpdateTradeAsync((JobAssignmentListViewModel)context, e))"> @foreach (var trade in trades) { var isSelected = trade.Id == (context as JobAssignmentListViewModel)?.TradeId;<option value="@trade.Id" selected="@isSelected">@trade.Name</option> }</select></EditorTemplate></GridColumn>This just renders selected="" in the HTML when inspected. Is there a way to select the default option in Blazor for a dropdown?