To reproducce:
- Set the format of a GridViewDateTime column as follows:
GridViewDateTimeColumn dateTimeColumn1 = radGridView1.Columns[3] as GridViewDateTimeColumn;
dateTimeColumn1.Format = DateTimePickerFormat.Custom;
dateTimeColumn1.CustomFormat = "dd.MM.yyyy HH:mm";
dateTimeColumn1.FormatString = "dd.MM.yyyy HH:mm";
- Start the application and try to enter the time.
- You will notice that the caret is moved to the firs item.
Workaround
void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
RadDateTimeEditor editor = e.ActiveEditor as RadDateTimeEditor;
if (editor != null)
{
RadDateTimeEditorElement element = editor.EditorElement as RadDateTimeEditorElement;
element.TextBoxElement.TextBoxItem.RouteMessages = true;
}
}