1

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

Srihari
  • 2,387
  • 9
  • 51
  • 82
  • [Google says that XtraGrid is correct](https://www.google.com.tr/?gws_rd=cr&ei=n9NoUsiZN8K54ATs0IGgCQ#q=(6900+%2F+(1+%2B+5%2F100))) because the XtraGrid is also show the `6571.42857142857` (for decimal Price and Tax) – DmitryG Oct 24 '13 at 08:11
  • Ya that is correct only but when i run this project it shows "5349.4285545..." like this – Srihari Oct 24 '13 at 10:41

1 Answers1

0

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

ToDecimal([Price]) *  ((ToDecimal([Tax])/100)+1)
Stig
  • 1,323
  • 16
  • 22