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.

Stationing format in DoubleTextBox?

Thread ID:

Created:

Updated:

Platform:

Replies:

127054 Oct 23,2016 08:37 PM Oct 25,2016 07:49 AM WPF 4
loading
Tags: DoubleTextBox
laura
Asked On October 23, 2016 08:37 PM

In construction engineering, locations are determined by stationing. It's how we pinpoint exact locations of everything right down to the inch. The format is always XXXX+XX.XX
When we do math with it, we just ignore the "+" sign and treat that as a double with 2 decimal digits.
So, say the there are two stations(locations)given, 5463+22.46 and 5463+57.21. The distance between these two locations is 546357.21 - 546322.46 = 34.75 feet.
To the right of the "+" sign is always 2 digits before the decimal point. The left can have 1 to 4 digits, although on very very HUGE projects there can be 5 or 6 digits left of the "+" sign.
How do I change the DoubleTextBox format to always show any number to always have a "+" sign left of the first 2 digits left of the decimal point?

Keerthana Jegannathan [Syncfusion]
Replied On October 24, 2016 08:36 AM

  
Hi Laura.   
   
We checked your query, in this you have used "+" symbol as mask between two values. To display this mask value, we recommend you to use our "SfMaskedEdit" control. We have prepared a sample for your reference in which we have provided the value based on the required format and it can be downloaded from the below location.   
   
Sample :  SfMaskedEdit   
   
Regards.   
Keerthana J.  


laura
Replied On October 24, 2016 10:21 AM

That works.  Thank you!

laura
Replied On October 24, 2016 03:00 PM

Actually, I just ran into one problem. 

Your sample shows that using Keyup as a trigger.  But this doesn't work if one copy and paste into the mask box.

It seems that there is no ValueChanged trigger.  There is a TextChanged trigger but it doesn't work.

Keerthana Jegannathan [Syncfusion]
Replied On October 25, 2016 07:49 AM

Hi Laura,   
   
We request you to handle “LostFocus” event of SfMaskedEdit in which values can be updated when the control lost the focus. We have modified the previously updated sample for your reference and it can be downloaded from the below location.   
   
Sample: SfMaskedEdit   
   
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.

;