C# windows form
DataColumn col = new DataColumn(); col.DataType = typeof(string); col.Caption = "displayname" col.ColumnName = "fieldname"; dt.Columns.Add(col); gv.datasource = dt; the column still shows "fieldname"
DataTable dt = new DataTable(); DataColumn col = new DataColumn(); col.DataType = typeof(string); col.ColumnName = "fieldname"; dt.Columns.Add(col); dt.Rows.Add(1); gv.DataSource = dt; gv.Columns[0].HeaderText = "displayname";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)