Posted on: 9/21/2014 1:35:12 PM | Views : 404

i want to add datacolumn array to data table with default values.
DataTable sourceTable; sourceTable = new DataTable("SourceTable"); DataColumn[] dc = new DataColumn[] { new DataColumn("PK_ID", typeof(int)), new DataColumn("State_FK_ID", typeof(int)), new DataColumn("District_FK_ID", typeof(int)), new DataColumn("Mandal_FK_ID", typeof(int)), new DataColumn("School_ID", typeof(int)), new DataColumn("School_Name", typeof(string)) }; sourceTable.Columns.AddRange(dc); DataColumn School_Arc = new DataColumn("School_Arc", typeof(bool)); School_Arc.DefaultValue = true; sourceTable.Columns.Add(School_Arc); DataColumn[] dc1 = new DataColumn[] { new DataColumn("Principal_Name", typeof(string)), new DataColumn("Principal_Mobile_No", typeof(string)), new DataColumn("Ema ...

Go to the complete details ...