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
1090
UltraDateTimeEditor ExitEditMode IsValid Exceptoin
posted

Hi, I'm forcing ExitEditMode in either the ValueChanged or AfterCloseUp in order to get the current data when it's immediately available. Otherwise you have to tab out or click out to get the AfterExitEditMode to fire.

A posting here led me to be able to use:

if (((UltraDateTimeEditor)sender).IsInEditMode)
   ((UltraDateTimeEditor)sender).Editor.ExitEditMode(true, true);

and this works, but... if you select the drop down menu's "Today" link/button it will usually throw this exception:

System.ArgumentException: Can't access the 'IsValid' property when not in edit mode
   at Infragistics.Win.EditorWithMask.IsValidValue(String& errorMessage)
   at Infragistics.Win.EditorWithMask.get_IsValid()
   at Infragistics.Win.MonthDropDown.OnDateSelected(DateRangeEventArgs drevent)
   at System.Windows.Forms.MonthCalendar.WmDateSelected(Message& m)
   at System.Windows.Forms.MonthCalendar.WmReflectCommand(Message& m)
   at System.Windows.Forms.MonthCalendar.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Any way to trap this? or get around it? Thanks.

Parents Reply Children
No Data