Thursday, 14 June 2012

Add New column with default value in existing table


  System.Data.DataColumn newColumn = new System.Data.DataColumn("columnName", typeof(System.String));
newColumn.DefaultValue = "Your DropDownList value";
table.Columns.Add(newColumn);

No comments:

Post a Comment