5
Reply

How to write this code for the datagrid .

ZAIN ULARIFEEN

ZAIN ULARIFEEN

Feb 6 2013 11:36 AM
1.3k
#region SAVE AND UPDATE
               for (int i = 0; i < rowCount; i++)
               {
                   //CHECK ROW IS NOT SELECTED
                 if (Convert.ToBoolean(dataGridView1.Rows[i].Cells[0].Value) == false)
                   {
                       //ROW MUST HAVE STRING VALUE(NOT NULL OR EMPTY)
if (dataGridView1.Rows[i].Cells[1].Value != null && string.IsNullOrEmpty(dataGridView1.Rows[i].Cells[1].Value.ToString()) == false)
                       {
                           //IF ID IS NULL THAN SAVE
                           if (dataGridView1.Rows[i].Cells[5].Value == null)
                           {
 
}
 
 
Plzzz, Anyone Can Help Me.

Answers (5)