Below is my code, I can't understand why it says "NAME" when I start the project instead of "Test" as the column name? Why is that?
DataTable dt = new DataTable("main");
DataColumn col1 = new DataColumn();
col1.Caption = "Test";
col1.ColumnName = "NAME";
col1.DataType = typeof(string);
col1.ReadOnly = true;
dt.Columns.Add(col1);
dataGrid1.DataSource = dt;
DataRow drow = dt.NewRow();
drow["NAME"] = "row1";
dt.Rows.Add(drow);
--- neteject.com - Internet Solutions ---
DataTable dt = new DataTable("main");
DataColumn col1 = new DataColumn();
col1.Caption = "Test";
col1.ColumnName = "NAME";
col1.DataType = typeof(string);
col1.ReadOnly = true;
dt.Columns.Add(col1);
dataGrid1.DataSource = dt;
DataRow drow = dt.NewRow();
drow["NAME"] = "row1";
dt.Rows.Add(drow);
--- neteject.com - Internet Solutions ---