unbound column doesn't show result
Hi,
VB newbe looking for some help. :)
i have a datagrid with 8 columns (id, ean, name, description, price, totalprice, a spacer column and vat)
i like to show a calculated column in a datagrid showing price inc. vat (totalprice)
So i created a unbound column wich is on index 5 and when i try to populate that column it doesn't show the results.
Code:
For Each r As DataGridViewRow In Me.dataGridProducts.Rows
TotaalPrijs = r.Cells(4).Value + (r.Cells(4).Value * r.Cells(8).Value / 100)
r.Cells(5).Value = totaalPrijs
Next
when i use the index of any other bound column it shows me the result in the wrong column (category column)
Code:
For Each r As DataGridViewRow In Me.dataGridProducts.Rows
TotaalPrijs = r.Cells(4).Value + (r.Cells(4).Value * r.Cells(8).Value / 100)
r.Cells(6).Value = totaalPrijs
Next
Any help would be appriciated
Re: unbound column doesn't show result
If you always show this why don't you just add an expression column to the database table and then you won't ever need anything this convoluted?