hi guys,
im a bit stuck here and wondered if anyone could help?
what i want to do is, after the DataGridView is populated (this part works fine) is to do a calculation on 2 columns
i.e
column 2 column 6
1 2
2 2
i need column 1 and 2 to add up thier values i.e
column 2 column 6
3 4
then i want to multply column 1 and 2 so my label = 12
the code i have is
int a = Convert.ToInt32(dGV.CurrentRow.Cells[2].Value);
int b = Convert.ToInt32(dGV.CurrentRow.Cells[6].Value);
int c = a * b;
label4.Text = c.ToString();
but this keeps saying there is no instance of the object :/
cheers in advance