How to get the default numeric textbox to not show decimals at all?

All of the examples I've seen in docs and so on show how to include decimal places, though one of the responses showed how to show 0 decimal places with currency ("C0") but when I have tried ("N0") it still shows 2 decimal places. In particular, when the numeric textbox loses focus. How do I make it not do that? I'm using that text box for a 6 digit validation, but the extra decimal and 2 zeros causes a failure, and having to write extra code to work around that isn't great. Help?




1 Reply

PK Priyanka Karthikeyan Syncfusion Team January 9, 2024 01:49 PM UTC

Hi Russell Hires,

We have created a sample in NumericTextBox with the format set to "n0." However, on our end, it doesn't display the decimal values as expected. For your convenience, we've prepared a video illustration and a sample for your reference.

Sample: https://blazorplayground.syncfusion.com/hthzNsDOfExHowyv


If there's a possibility that we misunderstood your requirement, could you please provide additional details about your specifications? If feasible, sharing a video illustration would greatly assist us in better understanding your needs, enabling us to provide you with a more accurate solution

Regards,

Priyanka K


Loader.
Up arrow icon