You cannot bind individual DataColumns to columns in a GridDataBounGrid because individual DataColumns do not hod any data. You need both DataColumns and DataRows, and they need to be in a DataTable to complete teh necessary associations.
Normally Ado.NET puts DataColumns in a DataTable. And it is this DataTable that you bind to the GriddataBoundGrid. This is exactly the same way the .NET Framework''s Windows Forms DataGrid works. Here is simple code to programatically create a datatable. You first add the DataColumns to the DataTable, and then you add DataRows to the DataTable. Then, all you have to do is to assign the DataTable as the grid''s DataSource.
DataTable dt = new DataTable("MyTable");
int nCols = 4;
int nRows = 10;
for(int i = 0; i < nCols; i++)
dt.Columns.Add(new DataColumn(string.Format("Col{0}", i)));
for(int i = 0; i < nRows; ++i)
{
DataRow dr = dt.NewRow();
for(int j = 0; j < nCols; j++)
dr[j] = string.Format("row{0} col{1}", i, j);
dt.Rows.Add(dr);
}
this.gridDataBoundGrid1.DataSource = dt;