Hello,
the first Output of "i" (<GridColumn Title="@($"Grid {i}")">) works, the Output is 1,2,3,4,...10, but the second output (<p>@($"pos: {ctx.GridSizePosition} - i: {i}")</p>) "i" is always 11 (the last value +1 from of the loop).
<GridColumn Field="@(nameof(ArticlePriceSize.PriceListKey))" />
@{
for (int i = 0; i <= 10; i++)
{
<GridColumn Title="@($"Grid {i}")">
<Template>
@{
var ctx = context as ArticlePriceSize;
<p>@($"pos: {ctx.GridSizePosition} - i: {i}")</p>
}
</Template>
</GridColumn>
}
}
<GridColumn Field="@(nameof(ArticlePriceSize.AMSGridSizePosition))" />
How can I use the variable "i" in the Template?