Question

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

Était-ce utile?

La solution

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

ToDecimal([Price]) *  ((ToDecimal([Tax])/100)+1)
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top