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. Image for the cookie policy date
close icon

Stationing format in DoubleTextBox?

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?

4 Replies

KJ Keerthana Jegannathan Syncfusion Team 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   
   
Regards.   
Keerthana J.  



LA laura October 24, 2016 02:21 PM UTC

That works.  Thank you!


LA laura 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.


KJ Keerthana Jegannathan Syncfusion Team 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   
   
Regards,   
Keerthana J.   


Loader.
Live Chat Icon For mobile
Up arrow icon