HI
How do I setup an If condition = true do this else do that in Radzen.
example from c#
bool isTrue = true
if(isTrue)
{do this }
else
{do the other thing}
Thanks
Brian
HI
How do I setup an If condition = true do this else do that in Radzen.
example from c#
bool isTrue = true
if(isTrue)
{do this }
else
{do the other thing}
Thanks
Brian
Hi Brian,
The template in this demo is using exactly such condition:
https://blazor.radzen.com/datagrid-conditional-template
<Template Context="data">
@if (data.Quantity > 20)
{
<span style='color:white'>@data.Quantity</span>
}
else
{
<span style='color:black'>@data.Quantity</span>
}
</Template>
Best Regards,
Vladimir
Hi Enchev
I Would like to implement the If condition in the Razden UI but I would like to know if this is possible and what properties to use ?
Thanks
Brian
In handlers Condition you can use page properties however here unlike templates you cannot have else - just true
and not true
. The language is C#.
Thanks Vladimir I have got my solution to work
Regards
Brian
Hi,
Please suggest how i can achieved attached tables in radzen data grid? where CR and DR fetching from database and need to calculate ledger
@Shubham_Singh use the Template
<Template Context="data">
@(data.Property1 - data.Property2)
</Template>