You can use the
NewRow() of the
DataTable object. Here is a code snippet and C#
Code:
DataTable tbl = new DataTable("Person");
DataColumn col = tbl.Columns.Add("LastName", typeof(tring));
col.MaxLength = 25;
col.AllowDBNull = false;
// Insert a new row
DataRow row = tbl.NewRow();
row["LastName"] = "Walker";
tbl.Rows.Add(row);