Hello Radzen team,
i would like to show a percentage value e.g 0,1900 (VAT) like this : 19,0 % or something like this on an Add/Edit page. I get formating percentages in datagrid column with formatstring {0:P} but not in an numeric inputfield because there is no formatstring property.
Regards
Thomas
I have tried this:
public partial class AddMwstComponent
{
public double PercentageProperty
{
get => (double)mwst.Prozent * 100;
set => mwst.Prozent = (decimal)value / 100;
}
}
and
<RadzenNumeric Step="0.001" style="display: block; width: 100%" @bind-Value="@PercentageProperty" Name="Prozent">
which works for me.
But although step size is 0.001 (or 0.5 or any other step size) the value is incremented by 1 (debugging and inspecting the value in set => mwst.Prozent = (decimal)value / 100;
I've tested with various types TValue double...decimal... nothing works. (btw... how can i define the TValue? i've done it in VS 2019 for testing)
Please help
Regards
Thomas
Ok.... i got it to work...
the step size must be set with a comma! 0,1 works. 0.1 dont. Unsual...