DataTable dt = new DataTable(); dt.Columns.Add("Name1", typeof(int)); dt.Columns.Add("Name2", typeof(object)); dt.Columns.Add("Name3", typeof(object)); for (int i = 0; i < 200; i++) { dt.Rows.Add( i, "款号" + Convert.ToString(i), "色号" + Convert.ToString(i)); } gridControl1.DataSource = dt;
___________________________________________________________________________________________________________
===========================================================================================================
DataTable dt = new DataTable(); dt.Columns.Add("Name1", typeof(int)); dt.Columns.Add("Name2", typeof(object)); dt.Columns.Add("Name3", typeof(object)); for (int i = 0; i < 200; i++) { dt.Rows.Add( i, "款号" + Convert.ToString(i), "色号" + Convert.ToString(i)); } gridControl1.DataSource = dt;