bool bMultiProductDS = false; // Get the first prod number string sFirstProductNumber = dsResults.Tables[0].Rows[0]["Product_Number"].ToString().ToLower(); // Define a variable to hold subsequent product numbers string sNextProductNumber = ""; // Define a row counter int iRow = 0; // Loop once for each row in the firs table foreach(DataRow oRow in dsResults.Tables[0].Rows) { // Skip the first row if (iRow == 0) { iRow++; continue; } // Get the next product number sNextProductNumber = oRow["Product_Number"].ToString().ToLower(); if (sFirstProductNumber != sNextProductNumber) ; { bMultiProductDS = true; break; } }