Hi all,
I use an databound UltraTree to show decimal values in a hierarchy. Displaying and editing works fine. but there's a small thing bugging me: edited decimal values don't have the same formatting as the displayed "old" values in the same column. They are shown "as entered", not "as formatted".
In my case, the decimal values are formatted N2 (e.g. 1.234,56), but entering 5432 shows just 5432, not the expected 5.432,00.
Whats wrong here?
Thx for any hint
Martin
Hello Ivaylo Petrov,
thanks for your quick reply.
Trouble resulted by a wrong datatype in my dataset's datatable. My field was decimal in the database and in the UltraTree-column, but in the datatable, it was Object... as I flipped it back to decimal, everything worked out as in your sample.
Thanks for putting me on the right track :)
Hi M S,
Thank you for posting in our forums!
My initial guess is that you have to set the format property which is of type string on this decimal column. I did that and it works for each cell under the column. When I edit a cell with random decimal number and exit the edit mode it gets formatted in the specific format I already set.
Our controls are using the .NET Standard Numeric Format Strings and Custom Numeric Format Strings
For further reference, take a look at the attached sample application and let me know if it works for you.