title: How to set dynamic column header in webgrid?
body: <p>I have used web grid to display employee name, and the projects in a drop down against each employee. For Projects drop down column I have to display the date as column heading which is returned from a HTML helper. i.e. as per the below code instead of column heading "SelectedDate", I have to display the value returned by Html helper (DateTime)@Html.GetNextDate((DateTime)item.SelectedDate, 0)).</p>
  
  <p><strong>Below is the snap shot of View</strong></p>
  
  <pre><code>    @{
         var grid = new WebGrid(Model.employeeProjectsMapper);
       }
  
      @grid.GetHtml(
      columns: grid.Columns(
       grid.Column("EmployeeName"),
       grid.Column(
       header: "SelectedDate",
          format:
          @&lt;span&gt;
          @{ var index = Guid.NewGuid().ToString(); }
          @Html.Hidden("employeeProjectsMapper.Index", index)
          @Html.Hidden("employeeProjectsMapper[" + index + "].EmployeeID", (Int64)item.EmployeeID)
          @Html.Hidden("employeeProjectsMapper[" + index + "].SelectedDate",  
         (DateTime)@Html.GetNextDate((DateTime)item.SelectedDate, 0))
          @Html.DropDownList("employeeProjectsMapper[" + index + "].SelectedProject",    
         Model.ProjectList)
          &lt;/span&gt;
       )
      )
    )
  </code></pre>
  
  <p>Any help is much appreciated.
  Thanks
  Suma</p>