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
185
.NET error happening when user right clicks inside of the UltraWinSchedule control while in UltraDayView mode
posted

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

  • 28945
    Offline posted

    Hello Bob,

    Thank you for contacting Infragistics.

    Which version of Infragistics for Windows Forms development tools are you using? Ex. 2014 Volume 1.

    I tested this but wasn't able to reprodue the behavior. My steps were as followed.

    1. Drag a new UltraDayView control on Form1 in VS designer.
    2. Executed the project and added an appointment (Righ-click timeslot, etc.).
    3. Performed right-click on both appointment and calendar.
    4. Dragged appointment to new timeslot and performed step 3 again.

    Are you using the UltraCalendarInfo and/or assigning owners? Is this a UserControl or used with another control that may trigger the behavior and provoke the application?

    If possible, could you please provide an isolated sample that reproduces the behavior? i.e. Visual Studio solution.

    Let me know if you have any additional questions.

  • 28945
    Offline posted

    Hello Bob,

    I am following up and would like to know if you are still experiencing any difficulties with the UltraDayView control? If so, I look forward hearing from you and reviewing your response to my previous update. Have a good day.

  • 2094
    Offline posted

    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?

    Or will calling;

    Me.CalendarInfo.EventManager.AllEventsEnabled = False 
    On the calendarinfo disable this event from firing in the dayview object?


    Could this be the cause of this exception? It seems logical in my mind.