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.

Changing values after decimal point

Thread ID:

Created:

Updated:

Platform:

Replies:

121426 Dec 14,2015 02:50 AM Dec 16,2016 07:46 AM WPF 7
loading
Tags: UpDown
Dov
Asked On December 14, 2015 02:50 AM

Hi,

I'm trying to find a way to change the values after the decimal point using the buttons and keyboard.

For example, if my initial value is 0.000 and my cursor is between the decimal point and the first zero (0.|000) and I'm pressing the up button or the up keyboard button I would like that the value would be 0.100 and not 1.000.

Same thing for when I'm marking one digit (0.000) I would like it to be 0.100 and not 1.000.

Is it possible?

Thanks in advance.

Victory Jessie Selvam D [Syncfusion]
Replied On December 15, 2015 07:16 AM

Hi Dov,

Thank you for using Syncfusion products.

Currently our UpDown control does not support increment or decrement value based on CaretIndex. However, we have prepared a workaround sample and tried to meet your requirement. In the sample, we have modified the value of Step property based on SelectionStart position in the text box and in the repeat button PreviewMouseDown event. You can download the sample for the same from the following link:

Sample: UpDown_keys

Regards,
Jessie

Dov
Replied On December 16, 2015 01:45 AM

Thanks!

Exactly what I needed.

Victory Jessie Selvam D [Syncfusion]
Replied On December 16, 2015 06:26 AM

Hi Dov,

Thank you for your update.

Please let us know if you need any other assistance.

Regards,
Jessie

Dov
Replied On December 6, 2016 08:37 AM

Hi,

Is it possible to create this sample to a DoubleTextBox control?

Regards,

Dov.

Jegan Raj M [Syncfusion]
Replied On December 14, 2016 07:52 AM

Hi Dov,

Sorry for the delay.

Yes, it is possible to increment or decrement the value in DoubleTextBox based on CaretIndex. We have prepared a workaround sample in which we have modified the value of Step property based on SelectionStart position in the DoubleTextBox and it can be downloaded from the below link.

Sample: http://www.syncfusion.com/downloads/support/forum/121426/ze/DoubleTextBoxUpDown-2142180224  

Regards,
Jegan Raj M

Dov
Replied On December 15, 2016 01:12 AM

Thank you for the reply.

I still have 2 problems in DoubleTextBox control:

1. On first button press on any digit after decimal point the leading zero change as well (happens only on first press).

2. If the value is 100.00 and I want to change the number that is marked if I stand to the left and press up the result would be 101.00 instead of 110.00.

Is it possible to give a solution for all digits prior to the decimal point? 

Regards,

Dov.

Keerthana Jegannathan [Syncfusion]
Replied On December 16, 2016 07:46 AM

Hi Dov, 
 
We have modified the sample in which we have updated the value before the decimal point on up key and down key for 3 digits before decimal point using the “Step” property and by handling the “ValueChanging” and “Preview_KeyUp” of the DoubleTextBox and it can be downloaded from the below location. 
 
 
Please let us know if we misunderstood your query. 
 
Regards, 
Keerthana J 


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.

;