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 borsdiyaRank #2,258 · 624 reputationPosted May 15, 2017, 1:20 AM EDT
Amit GuptaRank #190 · 12.8K reputationPosted May 14, 2017, 11:40 PM EDT
Rafnas T PRank #280 · 8.8K reputationPosted May 15, 2017, 12:22 AM EDT
habib ullahRank #8,316 · 224 reputationPosted May 15, 2017, 10:57 AM EDT