Click here to Skip to main content
15,891,184 members

Comments by Member 3356170 (Top 1 by date)

Member 3356170 1-Jan-18 22:22pm View    
DataRow[] rows = Dataset1.Tables[0].Select("Location_Name IN (" + Selected_locations + ")");
DataRow NewRow;

NewTB.Columns.Add("Name", typeof(string));
NewTB.Columns.Add("Reg_Date", typeof(DateTime));
NewTB.Columns.Add("Location_Name", typeof(string));
NewTB.Columns.Add("CityID", typeof(string));
NewTB.Columns.Add("LocationID", typeof(string));
NewTB.Columns.Add("Reg_For", typeof(string));

foreach (DataRow row in rows)
{
NewRow = NewTB.NewRow();
NewRow["Name"] = row["Name"];
NewRow["Reg_Date"] = row["Reg_Date"];
NewRow["Location_Name"] = row["Location_Name"];
NewRow["CityID"] = row["CityID"];
NewRow["LocationID"] = row["LocationID"];
NewRow["Reg_For"] = row["Reg_For"];
NewTB.Rows.Add(NewRow);
}