I have several datetime columns I display fine after setting col.Format = "yyyy-MM-dd HH:mm:ss.fff" but when I click on them I only see the date. If I set "col.CellActivation = Activation.NoEdit" then it displays fine but I cannnot even copy the value! I realize editing the value could be an issue but since ActivateOnly does not allow editing I don't see why the format should be ignored. Is there a way to turn this behavior off and keep my formatting but still be able to copy the cell as I have it formatted? On a related issue, it would be nice if we could text edit the datetime using the format we set even if we have to convert it ourselves if the datetime editor will not respect the format we set. Thanks, Dave
UltraGridColumn separates the display of the cell text from the input validation using character masks. The MaskInput property determines what characters can be typed by the user; when the DateTimeEditor is in use, the date mask is generated from the current culture settings, and does not have any bearing on the format. In your case you can use the same tokens for year, month, day, hour, minute, and second, but the masking engine does not currently recognize the millisecond formatter ("f").
Hello,
Thanks for the information. Is there a way to override this functionality. For example catching an event before it validates and setting the correct date time in? Timestamps in may databases require mili seconds and this causes issues when we bind to the data source and allow editing.
Any guidance you can provide would be great.
Thanks
Tim