Create new headers for your DataGrid with the DataGridItem object ASP NET

Dim dgItem As DataGridItem
dgItem = New DataGridItem(0, 0, ListItemType.Header)
Dim dgCell As TableCell
dgCell = New TableCell
dgCell.Text = "someval"
dgItem.Cells.Add(dgCell)
DataGrid1.Controls(0).Controls.AddAt(0, dgItem)
This code creates a new DataGrid header with one table cell and adds it to the first row of DataGrid1 on a Web form.