We are using the below code
var grid = new GridView(); HeaderCell2 = new TableCell(); HeaderCell2.Text = item.Goal; HeaderCell2.HorizontalAlign = HorizontalAlign.Left; HeaderCell2.BorderStyle = BorderStyle.Outset; HeaderRow3.Cells.Add(HeaderCell2);