Currently i've a following Scenario :
I've a custom control for Numeric Input. Which have the Property called : DecimalType. Which might be Long or Short Decimal.
And, the Problem is : I want to Format the Given input as Common. Which either format the Current input in 2 decimal Digits (Short) or 4 decimal Digits(Long) by using the Current Culture.
I can setup only one format on the Current Culture.
Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalDigits = 2;
or
Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalDigits = 4;
So, in my situation, how do i handle this efficiently? Because, in a single form there might be 2 short decimal textboxes and 4 long decimal textboxes. By changing NumberDecimalDigits to 2 will not work for long decimal or vice-versa.
In Short : The Text should be formatted according to the Current Culture with the 2 custom decimal length.
Any suggestions that i can follow to handle those things?