Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
AutoFillTime not working on EditorComponents
posted

The UltraDateTimeEditor control has a property called 'AutoFillTime'. When this property is set to 'CurrentTime' the time section in the control is automatically filled in should a user enter a date but not a time in the control and end an edit (i.e., set a format mask to '{date} {time}' in a UltraDateTimeEditor, enter the value 10/10/1950 and tab out of the control and the time will get automatically filled in).

If I use the same control as the EditorComponent for an ultra grid column the same behavior does not happen. If a time is not entered into the cell a DataError is raised.

Is it possible to get the ultragrid to automatically fill in the missing time values?

I've attached a solution that can be used to reproduce the problem.

1) In first drop down enter the values 11/11/1111 and press tab -> the current time gets appened to the value you entered.

2) Click the first cell in the ultra grid, enter the value 11/11/1111 and press tab -> Data Error is raised. Current time is not appended to the entered value.

DateTimeEditorComponent.zip
Parents
  • 469350
    Verified Answer
    Offline posted

    Hi, 

    I tried your sample and I get the same results. This appears to be a bug.

    What's happening is that when you set the AutoFillTime property at design-time, this is happening before the UltraDateTimeEditor has created it's external editor (which is what the grid will use).

    When the editor eventually does get created (which happens when you assign the EditorComponent property of the grid), it should be copying the AutoFillTime setting to the external editor, but it's failing to do that.

    I'm going to foward this thread over to Infragistics Developer Support and ask them to create a case for you and write this up so that we can get it fixed. The bad news is that v10.3, which you are using in your sample, is retired. So this will only be fixed in the latest supported versions of the control.

    The good news is that you can work around this very easily. All you have to do is set the AutoFillTime property on the editor after you attach it to the EditorControl property of the grid.The proeprty setting must change in order for this to work, so I recommend that you do not set AutoFillTime at design-time and only set it run-time.

Reply Children
No Data