Hi,
I am trying to set up a calculated column on a datagrid which is bound to a dataset.
I have been using an expression column that calculates the total eg:
but this has been giving me rounding problems (needs to be 2 decimal places).
Is there a way of rounding computed columns or do i have to calculate the total manually and if so how can i do that (using CurrentCellChanged ?).
many thanks for any help
I am trying to set up a calculated column on a datagrid which is bound to a dataset.
I have been using an expression column that calculates the total eg:
VB.NET:
[COLOR=black][FONT=Verdana]ds.Tables("Price_Detail").Columns.Add("NewPrice", System.Type.GetType("System.Decimal"))[/FONT][/COLOR]
[COLOR=black][FONT=Verdana]ds.Tables("Price_Detail").Columns("NewPrice").Expression = "base_price/100 * (100 + percentage))"[/FONT][/COLOR]
but this has been giving me rounding problems (needs to be 2 decimal places).
Is there a way of rounding computed columns or do i have to calculate the total manually and if so how can i do that (using CurrentCellChanged ?).
many thanks for any help