This is a migrated thread and some comments may be shown as answers.

ArgumentNullException while loading custom appointments

0 Answers 105 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 22 Mar 2011, 03:08 PM
Hi,

I have a "custom appointment" class which implements IAppointment and an ObservableCollection of that type which the RadScheduleView is bound to. I can't inherit from Appointment/AppointmentBase because of our business logic, so I implemented the IAppointment interface and the Copy and CopyFrom methods. We use Silverlight 4 with the latest RadControls (released and bugfixed version tested).
While loading the RadScheduleView I have the following error:

Unhandled Error in Silverlight Application Code: 4004 Category: ManagedRuntimeError Message: 
System.ArgumentNullException: Der Wert darf nicht NULL sein. Parametername: source bei System.Linq.Enumerable.OfType[TResult](IEnumerable source) 
bei Telerik.Windows.Controls.ScheduleView.AppointmentExtensions.GetResources(IOccurrence occurrence) 
bei Telerik.Windows.Controls.AppointmentsHelper.InitializeAppointmentSlotInformation(IEnumerable source, Boolean roundAppointmentDurationToDay, 
DateTime effectiveRangeStart, DateTime effectiveRangeEnd, GroupItemInfo groupItemInfo, Boolean simpleRendering, TimeSpan startTime, TimeSpan endTime, IList`1 groupedResources) 
bei Telerik.Windows.Controls.GroupHeader.InitializeColumnsAndUpdateMaxIntersectedAppointmentsCount() bei Telerik.Windows.Controls.GroupHeader.Initialize() 
bei Telerik.Windows.Controls.AppointmentsPanel.UpdateHeaderAvailableSize(List`1 headers, Double availableLength, Boolean isHorizontal, Boolean initialize, Boolean redistributeAvailableSpace) 
bei Telerik.Windows.Controls.AppointmentsPanel.MeasureOverride(Size availableSize) 
bei System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)

Any ideas?

Thanks in advance

Thomas

Edit: Problem solved. The Resources Property which needs to be implemented has to have a value different from null. In RadScheduler this wasn't the case I think.

No answers yet. Maybe you can help?

Tags
ScheduleView
Asked by
Thomas
Top achievements
Rank 1
Share this question
or