when we run the program then show the following error
object cannot be cast from dbnull to other types
i vahe calculate the datagraid view cell
int sum = 0;
for (int a = 0; a < dataGridView1.Rows.Count; a++)
{
sum += Convert.ToInt32(dataGridView1.Rows[a].Cells[2].Value);
}
label5.Text= sum.ToString();
}
ketan borsdiyaPosted May 15, 2017, 5:20 AM
habib ullahPosted May 15, 2017, 2:57 PM
Rafnas T PPosted May 15, 2017, 4:22 AM
Amit GuptaPosted May 15, 2017, 3:40 AM