I'm trying to make two columns, one with a date and one with a time. I would use the DateTimeColumn, except there doesn't seem to be a very good way to format it as time. Also, the DateTimeColumn doesn't apply formatting to filter cells (or to its own cells for that matter - you have to modify them in the CellFormatting event.)
My solution was to just use MaskBoxColumns with masks that would correspond to date and time, respectively. However, MaskBoxColumns don't apply whatever value you assign to the Mask property, for whatever reason. It seems to always want to format anything entered as a monetary value, regardless of the mask. The MaskType value is also unavailable in this context.
My next step was to attempt to make a regular column and insert the MaskBoxeElements as necessary in the CellFormatting event, as described here: http://www.telerik.com/community/forums/thread/b311D-hhddm.aspx
This causes an exception in the "key" paramater of something - the stack trace was very vague and I couldn't pinpoint the problem, nor could I reproduce it when stepping through code - it only affected runtime.
So my question boils down to whichever of the following is easiest to answer:
1) Can I format a DateTimeColumn to be time? (e.g. 11:23 AM) If so, how do I apply DateTimeColumn formatting to a filter cell for that row?
2) Can I apply masks to MaskBoxColumns and have them actually affect the input?
3) Can I insert MaskBox controls into a column without causing fatal runtime errors?
Help is greatly appreciated, once I get this ironed out I don't forsee any other problems with my project; everything else is fairly straightforward.
My solution was to just use MaskBoxColumns with masks that would correspond to date and time, respectively. However, MaskBoxColumns don't apply whatever value you assign to the Mask property, for whatever reason. It seems to always want to format anything entered as a monetary value, regardless of the mask. The MaskType value is also unavailable in this context.
My next step was to attempt to make a regular column and insert the MaskBoxeElements as necessary in the CellFormatting event, as described here: http://www.telerik.com/community/forums/thread/b311D-hhddm.aspx
This causes an exception in the "key" paramater of something - the stack trace was very vague and I couldn't pinpoint the problem, nor could I reproduce it when stepping through code - it only affected runtime.
So my question boils down to whichever of the following is easiest to answer:
1) Can I format a DateTimeColumn to be time? (e.g. 11:23 AM) If so, how do I apply DateTimeColumn formatting to a filter cell for that row?
2) Can I apply masks to MaskBoxColumns and have them actually affect the input?
3) Can I insert MaskBox controls into a column without causing fatal runtime errors?
Help is greatly appreciated, once I get this ironed out I don't forsee any other problems with my project; everything else is fairly straightforward.