I've been struggling to identify the source of some weird behavior when using a custom input mask on a DateTime backed column. I'm using a fairly typical date format as follows:
UltraGridColumn someDate = columns["SomeDate"];
someDate.MaskInput = "yyyy/mm/dd hh:mm:ss";
Now when editing this field, if you place the cursor between the 3rd and 4th digit of the year and hit the "delete" key, it properly deletes the last digit of the year but it sticks a zero in it's place. Since the zero is there you can't enter a new digit.
Pressing the delete key with the cursor in any other position within the entire datetime string does not have this issue (deletes properly and shows the blank '_' character of the mask and allows another digit to be entered).
Thanks! Any insight would be greatly appreciated!
(This is with version 2009.2).
Infragistics has addressed this issue in a service release of version 2010.3 (10.3.20103.2094, available 12 May 11).
Hello,
I have creates a support ticket for you with id CAS-62927-V9SZCG, in order toinvestigate this issue further for you.
Thank you.
Mike Saltzman"]It also seems like this only happens when the year is first. If I use "mm/dd/yyyy" it doesn't happen.
Agreed. I only saw the issue with the yyyy/dd/mm format.
Thanks for the prompt replies!
Hi,
Okay, I tried this out and I get the same behavior. I'm going to forward this thread over to Infragistics Developer Support so they can write it up for developer review.
rastedt said:It also looks like the editor that is set by default (when checking the Editor property of the UltraGridColumn) is of type Infragistics.Win.DateTimeEditor, not UltraDateTimeEditor as you mention.
DateTimeEditor is the editor. UltraDateTimeEditor is the control, which uses a DateTimeEditor. So they are basically the same thing. I tried this out using the UltraDateTimeEditor control and I the same results, so this is an issue with the editor.
It also seems like this only happens when the year is first. If I use "mm/dd/yyyy" it doesn't happen.
No events are being handled on the editor. I created a new project, threw an ultragrid on the form, gave it a single DateTime column, added a row to the autogen'd data source in the form's OnLoad method, and setup InitializeLayout as follows:
private void ultraGrid1_InitializeLayout(object sender, InitializeLayoutEventArgs e){ var band = e.Layout.Bands[0]; UltraGridColumn date = band.Columns["Column 0"]; date.MaskInput = "yyyy/mm/dd hh:mm:ss";}
Same behavior. Note that it is not the backspace key as you mentioned in your post, but the delete key. And only between the third and last digit of the year.
It also looks like the editor that is set by default (when checking the Editor property of the UltraGridColumn) is of type Infragistics.Win.DateTimeEditor, not UltraDateTimeEditor as you mention.
The specific version of UltraWinGrid.v9.2 we are using is 9.2.20092.2119.