How could I use @if blocks to build the equivalent of this ? : inline code? Thx!
grid.Column("Name", "Name", format: @<text>
<div
style='color: @(@item.Name == "Bill") ? "black" : "red") '
>
@item.Name
</div>
</text>),
How about externalizing this logic into a partial to avoid the mess:
and then inside your
_item.cshtmlpartial do whatever ifs you want or even better use HTML helper: