I also tried adding a custom column in the BO that returns a TimeSpan, but in addition to not formatting the value the way I want to (showing exactly hundredths of a second), I it doesn't post the changed value back to the table via the BO property's set.
Any suggestions?
...Jim
If you want to edit the exact value rather than formatting it as a string and then parsing, you are going to have to create a custom control.
You are correct...but you can reverse engineer it to place it back into a date time if you need to. If you know the starting DateTime then you can always get back to a date time by just doing the math.
I would have to see how your custom property was created, but if you properly implement a custom property with the same attributes as a property created through the BO mapper then a control does not know the difference when bound.
First, my custom class for centi-seconds that already did the parsing and formatting worked great, but to use it as the type of the BO property for the custom column I first had to create a custom TypeConverter to go with it (easy!). But that still didn't get it working.
The second piece to the puzzle was the same reason that the TimeSpan didn't work: I have to have formattingEnabled set to true in the binding object. Ergo, I had to set BindingFormat to something on the control so StrataFrame would set formattingEnabled to true. That done, my set on the BO property gets called just fine! Why the binding object needs to have formattingEnabled set to true for TimeSpan and my custom type, but not for double is beyond me!