I am trying to pass a number to a custom formatting function from a RadzenDataGridColumn using the <Template>
tag. This works fine for most grids, but I have a few columns that are using programatically-defined property names, and the Context
parameter of Template only gives me the base object, not the property the row uses
Sample code:
<RadzenDataGridColumn TItem="DataRow" Property="@($"{value.Name}.BaseValue")" Title="Base" MinWidth="100px" Width="100px" Visible="@columnInfo.ShowBase">
<Template Context="data">
CustomNumberFormatter(data.??)
</Template>
</RadzenDataGridColumn>
I need to call CustomNumberFormatter
on the {value.Name}.BaseValue
property of data
, not on data
itself. How can I access the property this specific cell is using so I can format the text? It might end up not needing Template
at all, but I just need to run a function on that value other than ToString
or a standard FormatString
to convert the data into how I want it displayed.