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
725
Issue with a timeline
posted

I have this exception each time i want to drag the appointement to another owner

System.ArgumentException: Can not convert object of type 'System.String' to type 'System.Int32'.

   to System.ComponentModel.ReflectPropertyDescriptor.SetValue (Object component, Object value)
   to Infragistics.Win.UltraWinSchedule.Appointment.BoundPropertySet (AppointmentsDataBindingPropertyId currentPropertyId, Object newValue, AppointmentPropIds undirtyPropertyId, Boolean updateForUnboundMember)
   to Infragistics.Win.UltraWinSchedule.Appointment.BoundPropertySet (AppointmentsDataBindingPropertyId currentPropertyId, Object newValue, AppointmentPropIds undirtyPropertyId)
   to Infragistics.Win.UltraWinSchedule.Appointment.set_OwnerKey (String value)
   to Infragistics.Win.UltraWinSchedule.Appointment.InternalSetOwner (Owner NEWOWNER)
   to Infragistics.Win.UltraWinSchedule.Appointment.set_Owner (Owner value)
   to phase uiAction action, DateTime newDateTime, Owner NEWOWNER)
   to msginfo)
   to Infragistics.Win.SelectionStrategyBase.DragMove (MouseMessageInfo msginfo)
   to Infragistics.Win.SelectionStrategyExtended.OnMouseMove (ISelectableItem item, MouseMessageInfo & msginfo)
   to Infragistics.Win.SelectionStrategyExtended.OnMouseMessage (ISelectableItem item, MouseMessageInfo & msginfo)
   to Infragistics.Win.ControlUIElementBase.ProcessMouseMoveHelper (Object sender, MouseEventArgs e)
   to Infragistics.Win.ControlUIElementBase.ProcessMouseMove (Object sender, MouseEventArgs e)
   to Infragistics.Win.Utilities.ProcessEvent (Control control, ProcessEvent eventToProcess, EventArgs e)
   to Infragistics.Win.UltraControlBase.OnMouseMove (MouseEventArgs e)
   to System.Windows.Forms.Control.WmMouseMove (Message & m)
   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)

I can't track the error in my source code ....

There is the setting of my principal lines of code

 base.TimelineController.CalendarInfo.DataBindingsForAppointments.OwnerKeyMember = "HouseRecordID";

 base.TimelineController.CalendarInfo.DataBindingsForOwners.DataSource =  IList<HousesView>(){};

 base.TimelineController.CalendarInfo.DataBindingsForAppointments.DataSource =IList<ProjectionDetailsViewWrapper>(){}

Please tell me the way to find the line of code in my source.

thx

Parents
  • 48586
    Verified Answer
    posted

    Hello,

     

    Is HouseRecordID field is of int type, its type  should be string. That is why when you drag appointment UltraCalendarInfo tries  to recordt the ne owner key (which is String) into a field which is of type int and you are getting System.ArgumentException: Cannot convert object of type 'System.String' to type 'System.Int32'.

     

    Please let me know if you have any further questions.

Reply Children