for (int i = 0; i < dataGridView1.Rows.Count; i++) { for (int j = 0; j < dataGridView1.Columns.Count; j++) { if ((dataGridView1.Rows[i].Cells[j].Value != null) && (dataGridView1.Rows[i].Cells[j].Value.ToString().Trim() != "")) { myRow[dataGridView1.Columns[j].Name.Trim()] = dataGridView1.Rows[i].Cells[j].Value.ToString().Trim(); l_blnWrite = true; } else { l_blnWrite = false; break; } } if (!l_blnSavedRecord) { if(l_blnWrite) ds.Tables[l_strTable].Rows.Add(myRow); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)