C#.net
How we can declar the data row
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sandeep Singh ShekhawatPosted May 16, 2013, 5:32 AM
{
// below to create a new table.
DataTable table = new DataTable();
//Add Columns to table
table.Columns.Add("fName", typeof(string));
table.Columns.Add("lName", typeof(string));
// Once a table has been created, use the
// NewRow to create a DataRow.
DataRow row; row = table.NewRow();
// Then add the new row to the collection.
row["fName"] = "John";
row["lName"] = "Smith";
table.Rows.Add(row);
//now use table as data source
}