datatable绑定数据源
DataTable dt = new DataTable(); dt.Columns.Add("clmn1", System.Type.GetType("System.String")); dt.Columns.Add("clmn2", System.Type.GetType("System.String")); for (int i = 0; i < 3; i++) { DataRow dr = dt.NewRow(); dr["clmn1"] = "content" + i; dr["clmn2"] = "content" + i; dt.Rows.Add(dr); } gridControl1.DataSource = dt;