Dyanamic grid columns

Here i want last column "Task " is always shows the last but its shows the after name column and then shows years columns which i added in foreach .can you give solution for that

<RadzenDataGrid @ref="grid" Data="@products" TItem="product" AllowColumnPicking="true" style="max-height: 1000px; height:100%">
      <Columns>
          <RadzenDataGridColumn TItem="Product" Property="Id" Title="ID" />
          <RadzenDataGridColumn TItem="Product" Property="Name" Title="Task" />

          @foreach (var year in available years)
          {
              <RadzenDataGridColumn TItem="Product" Title="@year.ToString()" >
                  <Template Context="product"> 
                      @budget.History.FirstOrDefault(h => h.Year == year)?.Value ?? 0
                  </Template>
              </RadzenDataGridColumn>
          }

          <RadzenDataGridColumn TItem="Product" Title="Task" >
              <Template Context="product">
                  @budget.ThreeYearAverage
              </Template>
          </RadzenDataGridColumn>
      </Columns>
  </RadzenDataGrid>

Check this demo for reference on how to implement conditional columns: