Greetings!
I've got a database that I've bound an UltraWinGrid to, all of the fields in the database are stored as strings even though some are numbers with varying decimal places.
I've got no control over the database itself (unfortunate) or I'd fix the database so that it stores numbers as actual numbers, but that's what I have to work with.
I want to format the values so that they all display three decimal places, eg '109.38' as '109.380'. But I can't get the format property of the cell to do this. I assume it's because even though it's a number, it's stored as a string.
Is there some way to tell the Grid that it's actually a number?
Thank you for your time and attention to this problem.
Hi Gerry,
My recommendation in this case is to set up an intermediate data source in which you can convert the string data in your database to numbers and bind the grid to that instead. This will avoid many potential maintenance issues that could come up related to converting the data and ensuring that it is in the right format at the right time.
Please let me know if this approach does not work for you.
Well ... I was hoping there was some way I could tell the grid to convert without code, but oh well. Thanks!