I have a DataTable which has some rows and I am using the select to filter the rows to get a collection of DataRows which I then loop through using foreach and add it to ano
Try this:
DataTable dt = (DataTable)Session["dtAllOrders"]; DataTable dtSpecificOrders = dt.Clone(); DataRow[] orderRows = dt.Select("CustomerID = 2"); foreach (DataRow dr in orderRows) { dtSpecificOrders.ImportRow(dr); }