We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

SfNumericUpDown: how to edit integer values without showing decimal digits

Thread ID:

Created:

Updated:

Platform:

Replies:

128703 Jun 30,2016 04:44 AM Feb 7,2017 09:18 AM iOS 3
loading
Tags: SfNumericUpDown
Tim Coulter
Asked On June 30, 2016 04:44 AM

I am using the SfNumericUpDown in a UWP application where it is 2-way bound to an integer property on a view model.

Although the control edits and persists the bound value correctly, it displays 2 decimal places of precision, which seems wrong for an integer value.

I have tried the following, with no success:

- setting the FormatString property to D, which causes a crash. 
- setting the MaximumNumberDecimalDigits property to 0, which has no effect.
- setting the ParsingMode property to both Decimal and Double, neither of which solves the problem

For comparison, this problem does not exist in the Xamarin.Forms version of the control.

Can you please advise what I can do to solve this?

Thanks,
Tim

Ashok Kumar Murugesan [Syncfusion]
Replied On July 1, 2016 08:25 AM

Hi Tim,

Thank you for contacting Syncfusion Support.

We have used the double type as Value in SfNumericUpDown. So it will display the Value with Decimal digits. We can display the Value without decimal digits by setting the FormatString property as "N0" and MaximumNumberDecimalDigits as "0". We have prepared the sample that tries to meet your requirement. In this sample, we have set the FormatString property as "N0" and MaximumNumberDecimalDigits as "0". Please download the sample from the following link.

Sample:SfNumericUpDown

Regards,
Ashok Kumar M.


Neil Bleakley
Replied On February 6, 2017 05:00 PM

How is this done on iOS as the method used here works fine on UWP but within iOS it displays a N0 when using the buttons which are also not rendered properly.

Selva Kumar  Veerakrishnan [Syncfusion]
Replied On February 7, 2017 09:18 AM

Hi Neil, 

Thank you for contacting Syncfusion support. 

Query: FormatString property in ios. 
We have modified the attached sample as per your requirement. We have only four FormatString property “c”, “p”, “n”, and custom format. If you use FormatString=”NO” it will take it as a custom FormatString and it will be in the suffix to the SfNumericUpDown number. We have changed this in the below given sample.  So, please download the program from below given link. 
 
Please let us know whether the given sample solves your query. 
 
Regards, 
Selvakumar V 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;