I wonder if it is possible to allow MarkupString in Text of RadzenRadioButtonListItem. Please see the below codes: Thanks!
<RadzenRadioButtonList @bind-Value=@SrchSpectraElmId.Spectrum TValue="string">
@foreach (ElmSpectralIneId Itm in SelElmSpectralLineIds) {
@@
<RadzenRadioButtonListItem Value="@Itm.Spectral" Text="@((MarkupString) Itm.Spectral") />
}
Not possible however we accept pull requests:
I think a Template would be better and more consistent with the way other components are implemented. MarkupString should be used sparingly.
Do you have a sample? I tried the following but it does not work.
<RadzenRadioButtonList TValue="int" Orientation=Orientation.Vertical class="mb-5" Change="@((args) => SetOption(Ppo,args))">
<Items>
@foreach (var Ppod in Ppo.PricelistProductOptionsDetails)
{
<RadzenRadioButtonListItem Value="@(Ppod.ProductOptionsDetailId)">
<template>
@(Ppod.ProductOptionsDetail.Name) @((MarkupString)Ass.TemplateVm.CurrencyType.Symbol)@(Ppod.Price)
</template>
</RadzenRadioButtonListItem>
}
</Items>
</RadzenRadioButtonList>
Thanks
There is no template property - you can use Text property: