views:

69

answers:

0

I have a datagridview with columns: [Rent] [Electric] [deposit] [amount paid]. I also have 2 other columns called [total due] and [balance due] (in that order across the grid).

In the properties panel, in the expression property of the [amount paid] column, I entered this expression : [Rent]+[Electric]+[deposit]. This calculates these 3 columns and displays the sum in [amount paid] at runtime. It performs no problem. But when I hit the save button to save it to the database, I get this error:

"The column mapping from SourceColumn 'Amount Paid' failed because the DataColumn 'Amount Paid' is a computed column."

Finally, I also take the computed sum in [amount paid] and subtract it from the values that have been entered in [total due] and display the result in [balance due]. This also computes fine and I DO NOT get an error regarding the [balance due] column even though it is also a computed column. The error just gets thrown regarding [amount paid].

Confused.

Oceantrain.