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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Stationing format in DoubleTextBox?

Thread ID:





127054 Oct 24,2016 12:37 AM UTC Oct 25,2016 11:49 AM UTC WPF 4
Tags: DoubleTextBox
Asked On October 24, 2016 12:37 AM UTC

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 12:36 PM UTC

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   
Keerthana J.  

Replied On October 24, 2016 02:21 PM UTC

That works.  Thank you!

Replied On October 24, 2016 07:00 PM UTC

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 11:49 AM UTC

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   
Keerthana J.   


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon