I'm trying to format a column in my UltraWinGrid and seem to be stuck. The data that is bound is a string that contains only numbers (i.e. 262546500 or 1004344131). I would like this to be formatted with a dash before the last two numbers (i.e. 2625465-00 or 10043441-31). Is there a way i can do this, no amount of mask formatting seems to product the effect i'm looking for
Note that my data can be either be 9 or 10 characters long but there should always be a dash displayed before the last two characters. I do not want the underlying data changed, only the way it's displayed.
I have experimented using a variety of MaskInput values (even though i'm not inputting anything, only displaying) but the fact that there are either 9 or 10 characters seems to be causing a problem. What works for a length of 9 fails for 10, and so on. It seems as if the mask works from left to right but i'm not sure if that is the problem.
Have you tried setting the MaskInfo to "9#######-##"?