Requirment may arise when you want to add column in data table at runtime.It is a really simple task to do.
dt.Columns.Add(new DataColumn("Column1", System.Type.GetType("System.String")));
dt.Columns.Add(new DataColumn("Column2", System.Type.GetType("System.String")));
dt.Columns.Add(new DataColumn("Column3", System.Type.GetType("System.String")));
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment