>System.InvalidCastException: Specified cast is not valid. > at DataGridTimePickerColumn.Edit(CurrencyManager source, Int32 rowNum, Rectangle bounds, Boolean readOnly, String instantText, Boolean cellIsVisible) > at System.Windows.Forms.DataGrid.Edit(String instantText) > at System.Windows.Forms.DataGrid.Edit() > at System.Windows.Forms.DataGrid.set_CurrentCell(DataGridCell value) > at System.Windows.Forms.DataGrid.set_CurrentRow(Int32 value) > at System.Windows.Forms.DataGrid.ProcessGridKey(KeyEventArgs ke) > at System.Windows.Forms.DataGrid.ProcessKeyPreview(Message& m) > at System.Windows.Forms.Control.ProcessKeyMessage(Message& m) > at System.Windows.Forms.Control.WmKeyChar(Message& m) > at System.Windows.Forms.Control.WndProc(Message& m) > at System.Windows.Forms.DateTimePicker.WndProc(Message& m) > at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m) > at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m) > at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) >>PS: Casting to object is special case and not the thing here. It doesn't occur if you use only mouse.