andrei hooba

andrei hooba

  • NA
  • 63
  • 24.1k

Difference operation in datagridview

Mar 11 2012 3:47 PM
hello,

how can i make a difference between column 3 and 2, and the result to be writen to column 4 ?

i tried with :

int n = dataGridView1.Rows.Add();
dataGridView1.Rows[n].Cells[3].Value = (int)dataGridView1.Rows[n].Cells[2].Value - (int)dataGridView1.Rows[n].Cells[1].Value;

but no result.



any idea?

ty



Answers (3)