public List<string> GetRowValues(DataGridViewRow row)
{
var values = new List<string>();
IEnumerator ie = row.Cells.GetEnumerator();
while (ie.MoveNext())
{
var cell = ie.Current as DataGridViewTextBoxCell;
string value = Convert.ToString(cell.Value);
if (!String.IsNullOrWhiteSpace(value))
values.Add(value);
}
return values;
}