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
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.
Thanks Mike, the Creation filter seems the way to go, I haven't used them before but I'll check out the documentation.
If you are going to try the CreationFilter, I recommend that you get the Infragistics UIElementViewer Utility.
It will be a huge help. Let me know if you get stuck of have any questions.
Thanks Mike, that was it, for some reason that didn't click in my head to apply it to the proxy field....i'm off to slap myself upside the head.
thanks for all your help.
BTW... you are applying your CreationFilter to the Proxy control, right? The CreationFilter of the grid won't have any effect on the RowEditTemplate or the controls in it - you have to apply a CreationFilter to the proxy control itself.
You need to look for a TextUIElement - that's the element that displays the text.
Hi Mike,
There is one last thing i'm having a problem with, I'm using a row edit template and i need to change the text there also, but I can't seem to locate the item in the tree using getdescendants etc...
i've tried looking for
UltraGridCellProxyUIElement.... which the element view seems to show as the parent?
Excellent, thanks Mike I understand now.