-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for binding decimal, double, float data type with configurable formatting #5523
Comments
I can confirm this. |
I have just found that @Daddoon is working on this (dotnet/blazor#630) and it is almost ready. Thank you @Daddoon. |
Coming back on that in few days (as stated in dotnet/blazor#630 , i was working on some Xamarin/Blazor interop stuff). |
Is there a work around available for this until the issue gets resolved ? I have a value 0.00008900 which when I bind to a text box, gets represented as 8.9E-05. What is the best way to do this in blazor today? |
Partially related issue (formatting for numbers): #9435 |
Hi! What is the current recommended way to bind decimal objects? Is this how it's supposed to be used? Thanks & Regards!! |
@rynowak This is fixed now, right? (As of preview 8, I mean) |
No, we did not add support for formatting for numeric types. Only dates support formatting. |
Oh, I thought |
We have bespoke support for decimal. |
For a one-way binding scenario, what is the equivalent to |
There's no built-in library support for formatting based on a |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Thanks for contacting us. We're moving this issue to the |
Is #60112 sufficient to resolve this? |
Not yet, some issues are arising here: |
This should work
but currently we get an exception:
Error: System.ArgumentException: 'bind' does not accept values of type System.Decimal. To read and write this value type, wrap it in a property of type string with suitable getters and setters.
Decimal data type is paramount in every business application. We don't want to use "hacks" and convert it to/from string manually every time.
Support for formatting is also crucial (number of decimal places, decimal and thousandth separators)
The text was updated successfully, but these errors were encountered: