求解釋!走過的大俠幫我看一下
DataTable dataTable = new DataTable();
DataColumn column;
column = new DataColumn();
column.ColumnName = "CMCode ";
dataTable.Columns.Add(column);
column = new DataColumn();
column.ColumnName = "CMName ";
dataTable.Columns.Add(column);
column = new DataColumn();
column.ColumnName = "UniteName ";
dataTable.Columns.Add(column);
column = new DataColumn();
column.ColumnName = "RqQty ";
dataTable.Columns.Add(column);
DataRow row = dataTable.NewRow();
row[ "CMCode "] = "001 ";
row["CMName "] = "test ";
row[ "UniteName "] = "test ";
dataTable.Rows.Add(row);
------解决方案--------------------
------解决方案--------------------
准备画一个表格,先画
列1 列2 列3
再给列添加值{1, 2, 3}
列1 列2 列3
1 2 3
如果还有值{4, 5, 6}
列1 列2 列3
1 2 3
4 5 6
{数据库列1的值,数据库列2的值,数据库列3的值}
------解决方案--------------------