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
1187
UltraDayView - remove 'unassigned' owners from view
posted

 I have a form with an ultradayview control and ultracalendarinfo control.  I have bound a datatable to DataBindingsForOwners and a datatable to DataBindingsForAppointments.  If have the dayview control 'groupingstyle' set to no grouping, when I try to add an appointment I get the exception error shown below.  If I set the groupingstyle to 'OwnerWithinDate', the ultradayview always shows two columns, 'unassigned' and the one owner in the datatable.  I just want a simple form, dayview bound to a datatable that is always for the same owner.  How can I do this?

 

'

' owners

'

With Me.UltraCalendarInfo1.DataBindingsForOwners

.DataSource = Nothing

.KeyMember = "id"

.NameMember = "username"

.EmailAddressMember = "email"

.DataSource = mClientSettings.DATATABLESCACHE.DATASET.Tables("users")

End With

'

' appointments

'

With Me.UltraCalendarInfo1.DataBindingsForAppointments

.DataSource = Nothing

.AllDayEventMember = "alldayflag"

.AllPropertiesMember = "allproperties"

.AllPropertiesMemberSerializationMode = Infragistics.Win.UltraWinSchedule.DateSerializationMode.SerializeDatesAsLocalTime

.DescriptionMember = "description"

.EndDateTimeMember = "date_end"

.OwnerKeyMember = "ownerid"

.ReminderEnabledMember = "reminder_enabled"

.ReminderIntervalMember = "reminder_interval"

.StartDateTimeMember = "date_start"

.SubjectMember = "subject"

.DataSource = mClientSettings.DATATABLESCACHE.DATASET.Tables("traffic_actions")

End With

Me.UltraCalendarInfo1.Owners.UnassignedOwner.Visible = False

Me.UltraCalendarInfo1.Owners(0).Visible = True

 

 

 

 

************** Exception Text **************
System.ArgumentException: Input string was not in a correct format.Couldn't store <> in ownerid Column.  Expected type is Int32. ---> System.FormatException: Input string was not in a correct format.
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   at System.String.System.IConvertible.ToInt32(IFormatProvider provider)
   at System.Data.Common.Int32Storage.Set(Int32 record, Object value)
   at System.Data.DataColumn.set_Item(Int32 record, Object value)
   --- End of inner exception stack trace ---
   at System.Data.DataColumn.set_Item(Int32 record, Object value)
   at System.Data.DataRow.set_Item(DataColumn column, Object value)
   at System.Data.DataRowView.SetColumnValue(DataColumn column, Object value)
   at System.Data.DataColumnPropertyDescriptor.SetValue(Object component, Object value)
   at Infragistics.Win.UltraWinSchedule.AppointmentsCollection.AddAppointmentToDataSource(Appointment appointment)
   at Infragistics.Win.UltraWinSchedule.AppointmentsCollection.Add(Appointment appointment, Boolean allowCancel)
   at Infragistics.Win.UltraWinSchedule.AppointmentsCollection.Add(Appointment appointment)
   at Infragistics.Win.UltraWinSchedule.AppointmentDialog.SaveItem(Boolean closeAfterSave)
   at Infragistics.Win.UltraWinSchedule.AppointmentDialog.tbmMain_ToolClick(Object sender, ToolClickEventArgs e)
   at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.OnToolClick(ToolClickEventArgs e)
   at Infragistics.Win.UltraWinToolbars.UltraToolbarsManager.FireEvent(ToolbarEventIds id, EventArgs e)
   at Infragistics.Win.UltraWinToolbars.ToolBase.OnToolClick()
   at Infragistics.Win.UltraWinToolbars.ButtonToolUIElement.DoClickProcessing(MouseEventArgs e)
   at Infragistics.Win.UltraWinToolbars.ButtonToolUIElement.OnMouseUp(MouseEventArgs e)
   at Infragistics.Win.ControlUIElementBase.ProcessMouseUpHelper(Object sender, MouseEventArgs e)
   at Infragistics.Win.ControlUIElementBase.ProcessMouseUp(Object sender, MouseEventArgs e)
   at Infragistics.Win.Utilities.ProcessEvent(Control control, ProcessEvent eventToProcess, EventArgs e)
   at Infragistics.Win.UltraControlBase.OnMouseUp(MouseEventArgs e)
   at Infragistics.Win.UltraWinToolbars.UltraToolbarsDockArea.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(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)