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
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.
There is an attached example for what i want to do.
The exception occurs when i try to drag the appointment to another owner
Thx
Thank you for the provided sample. As I said in my previous response :
“Is HouseRecordID field is of int type, its type should be string.”
So I have modified your sample based on my suggestion and now it works correctly.
You could implement middle layer which will handle "conversation" between UltraCalendarInfo and your data.
Thx,
The field type is provided by the Database..
what i have to do if i want to keep the field type int like the database.