I Have Gridview in DevExpress Winforms XtraGrid. I Create Unbound Expression to Unbound Column but it not working properly that means it show some other value as result.

my Unbound Expression is

 InPrice.UnboundType = DevExpress.Data.UnboundColumnType.Decimal;
 InPrice.UnboundExpression = "[Price] / (1 + ([Tax] / 100))";

If Price = 6900 and Tax = 5 then Result is Equal to 6571.13 but when i run it show "5349.43.."

What is my error ? can any one help me ?

Thanks in Advance

有帮助吗?

解决方案

In order for this to work you will have to convert the numbers to decimal.

ToDecimal([Price]) *  ((ToDecimal([Tax])/100)+1)
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top