How can i disable the GridView Headers? I didn't give them a Name but it still shows "colum1", "colum2"
I already tried:
GridView.ShowHeader = false; GridView.HeaderRow.Enable = false;
But that didn't work... So how to solve this problem?
My Code:
GridView gw = new GridView();
gw.DataSource = tblDetails;
gw.DataBind();
gw.CssClass = tblDetailsCssClass;
gw.RowStyle.Height = 50;
panelMain.Controls.Add(gw);
CssClass:
.Bilddb-tblDetails
{
color:black;
font-size:2em;
margin: 0 auto;
margin-top:20px;
display:block;
width:100%
}
tblDetails:
DataTable tblDetails = new DataTable();
DataColumn colum;
DataRow row;
colum = new DataColumn();
colum.DataType = Type.GetType("System.String");
tblDetails.Columns.Add(colum);
colum = new DataColumn();
colum.DataType = Type.GetType("System.String");
tblDetails.Columns.Add(colum);
row = tblDetails.NewRow();
row[0] = "Title:";
row[1] = item.Title;
tblDetails.Rows.Add(row);
row = tblDetails.NewRow();
row[0] = "Botanical Name:";
row[1] = item.BotanicalName;
tblDetails.Rows.Add(row);
tblDetails?