private static DataTable ConvertTableType(DataTable dt) { DataTable newDt = dt.Clone(); //convert all columns' datatype foreach (DataColumn dc in newDt.Columns) { dc.DataType = Type.GetType("System.String"); } //import data from original table foreach (DataRow dr in dt.Rows) { newDt.ImportRow(dr); } dt.Dispose(); return newDt; }
Thanks Dude
ReplyDelete