user5756332
user5756332

Reputation:

Numericupdown as 0.00 in c#

I need that numericUpDown as 0.00 format i don't know how to make numericUpDown as 0.00

when i make increment in numericUpDown it increment like this 1.00 , 2.00 ......n.00

enter image description here

enter image description here

when i make decrement

it gives -1.00 , -2.00 ....-n.00

enter image description here

enter image description here

How do i make numericUpDown like this format help me.

Upvotes: 1

Views: 251

Answers (1)

sujith karivelil
sujith karivelil

Reputation: 29006

You need to specify the DecimalPlaces for the numericUpDown1 otherwise the default value 0 will be taken, Like wise you have to specify the .Increment also otherwise the default value 1 will be evaluated. Now see the How to set these :

numericUpDown1.DecimalPlaces = 2;
numericUpDown1.Increment = 0.01M;

More notes on NumericUpdown

Upvotes: 1

Related Questions