romasha ali

romasha ali

  • NA
  • 94
  • 38.3k

how to multiply two columns and get result in next culomn?

Apr 1 2016 6:42 PM
hi,
i m trying this code but it show anything in result column kindly guide..
 
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
for (int n = 0; n < (dataGridView1.Rows.Count - 1); n++)
{
int s = Convert.ToInt32(dataGridView1.Rows[n].Cells[3].Value);
int s1 = Convert.ToInt32(dataGridView1.Rows[n].Cells[4].Value);
int s13 = s1 + s;
dataGridView1.Rows[n].Cells[5].Value = s13;
}
 

Answers (4)