Hi all.
I was trying to rename a column in a datagrid so I could pull data from different tables but use the same form/datagrid for it.
the only way that I could find to do this was at this link:
It describes how to add columns via code at run time... and also some other things.
In short the way to add a column is
// Create ID column & add to DataGrid
BoundColumn col = new BoundColumn();
col.HeaderText="User ID";
col.DataField="ID";
DataGrid1.Columns.Add(col);
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.