문제

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