Hello,
Our product uses the UltraWinSchedule control. When a user is using the UltraDayView mode and they right clicks the user will sometimes get a .NET error. It's erratic and we are unable to recreate the issue on our end. Have you guys heard of this issue or do you know what's causing it? The following is the exception text from the .NET error:
System.NullReferenceException: Object reference not set to an instance of an object. at Infragistics.Win.UltraWinSchedule.UltraDayView.RestoreAppointmentsToPreDragPositions() at Infragistics.Win.UltraWinSchedule.UltraDayView.OnDragOperationEnded(Boolean hadStarted, Boolean canceled) at Infragistics.Win.UltraWinSchedule.UltraDayView.Infragistics.Win.ISelectionManager.OnDragEnd(Boolean cancelled) at Infragistics.Win.UltraWinSchedule.UltraDayView.OnMouseDown(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Thanks,
Bob
My Users are also sporadically receiving this error on RIGHT MOUSE CLICK.
ERROR - UNHANDLED EXCEPTION.
Message: Object reference not set to an instance of an object.TargetSite: Void RestoreAppointmentsToPreDragPositions()StackTrace: at Infragistics.Win.UltraWinSchedule.UltraDayView.RestoreAppointmentsToPreDragPositions() at Infragistics.Win.UltraWinSchedule.UltraDayView.OnDragOperationEnded(Boolean hadStarted, Boolean canceled) at Infragistics.Win.UltraWinSchedule.UltraDayView.Infragistics.Win.ISelectionManager.OnDragEnd(Boolean cancelled) at Infragistics.Win.UltraWinSchedule.UltraDayView.OnMouseDown(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I am guessing here but let me know if this could be the cause;
Perhaps the "APPOINTMENT" object IS going out of memory. In some circumstances, shortly after Right mouse clicking, the appointment data source is refreshed from the server. Essentially clearing the appointment object from memory and reloading in appointments again.
Is there anyway to flush ALL events from the UltraDayView before I refresh the CalendarInfo data source? Do I simply call "Application.DoEvents" before I refresh the data source?
Or will calling;
Me.UltraDayViewAppointments.EventManager.AllEventsEnabled = False On the UltraDayView item disable or flush this event from firing and then after the appointment is refreshed then re-enable the events?
Me.CalendarInfo.EventManager.AllEventsEnabled = False On the calendarinfo disable this event from firing in the dayview object?
This certainly looks like a bug in the control, so I'm not sure you'll be able to easily work around it. Ideally you should send us a sample that reproduces the issue so we can say conclusively what causes it (and then fix it). If that isn't possible, we can try to address the null ref exception and then you'll have to let us know if it solves the problem for you.