Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
285
Wingrid with calc manager rounding
posted

Hello,

I have read the post below and I have a similar issue but I don't know how to get around it. The users are expecting to see 0 in a calculated field but are seeing 0.01... this is -0.00547442024253542D rounded to 2 decimal places... I understand that this is because I am using decimals and the calc manager uses double ... but I'm not sure at what point to round this so it shows 0.... if i try to update the cell in the before or after row edit template displayed event for example the value gets changed by the calcmanager afterwards. Is there a place I can change the value after the calc manager has calc'd the cell but before it is displayed?

http://forums.infragistics.com/forums/p/5338/24183.aspx

 

regards

 

Darren

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Darren,

    You could change the display in any number of ways. The simplest way is to hide the real column with the formula in it and add an unbound column in it's place. Then you just use the InitializeRow event to get the value from the real column, format it however you want, and set the value of the unbound cell in the same row to display to the user.

    Another option would be to use a DrawFilter or a CreationFilter to change the display text of the cell without affecting the underlying value.

    You could also do the same thing using a DataFilter, but this would be the most complicated option.

Children