Using ultrawebgrid with footers shown and using
UltraWebGrid1.Columns(4).FooterTotal = Infragistics.WebUI.UltraWebGrid.SummaryInfo.Avg
to calculate averages. need to be able to round and truncate results to 2 decimal places. Not sure how to do it.
Hello jcom39201,
Thank you for posting in our community. I can recommend you to follow this post. This link is really helpful:
http://community.infragistics.com/forums/t/31930.aspx
Also you can round and truncate the result and to apply it to the footer`s text.
I hope this helps.
For any further questions with this matter do not hesitate to contact me.
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://ko.infragistics.com/support
Thanks for the reply. I looked at the post but do not see anything that pertains to the footer and issue that I am having, unless I am missing it.
I do round and truncate the data in the cells but when using the Average for the footer it shows 6 decimal places.
Can you provide a sample code that reproduces this scenario in order for us to investigate this further.
Looking forward hearing from you.
I use a datset to bind to the grid at runtime and after the grid has been bound I set the footer per this code...
The values from the dataset are already truncated and show fine in the grid but the footer average values show with a random number of decimal places. Attached is a snapshot of grid data.
Can you specify which version are you using, which build? I will need to create a sample in order to investigate this and I will need this information.
Using...
Infragistics35.WebUI.UltraWebGrid.v9.2, Version=9.2.20092.1003
does this help?
That did it! Thank you Georgi!
Yes this was helpful. I have created a sample on your behalf with the specified version. You can find it attached and download it for review. I hope this helps. I used the data in your grid in order to reproduce it. You can set the Format for the whole column to be “###.##” which will solve your issue.
Let me know if you have further questions with this matter,