Hi,
I need to enter a time in the format hhhh:mm to be entered into i a grid.
I tried setting the MaskInput Property of the Column to "nnnn:nn" entering the time works fine, but as soon as the AfterCellUpdate is fired the value is set to hhhhmm without the ":". I need the Value as a String.
Is there any way to accomplish this
Edit: The Grid is databound so i cant set the type property and I tried setting a format too without succeeding
I was going to test this out but I don't have enough information.
What's the DataType of the column?
You probably need to set the MaskDataMode on the column and tell it to include the literals.
You might also want to take a look at MaskClipMode and MaskDisplayMode.
Thanks for the Advice it could be done by setting the MaskDisplay- and MaskDataMode to MaskMode.IncludeLiterals.
So if anyone has a similar Problem here is what I did:
column.MaskInput = "nnnn:nn";
column.MaskDisplayMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeLiterals;
column.MaskDataMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeLiterals;
I tried to use the Mask "nnn#:##" but it wasn't possible to enter the time the way i liked (from right to left) so i just used a check in the Leave Event
Thanks