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

Appointments CollectionChanged fires unexpectedly !!

1 Answer 84 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Xiao
Top achievements
Rank 1
Xiao asked on 06 Oct 2011, 09:11 PM
Hi all , i am handling  CollectionChanged on Appointments ObservableCollection  on my ViewModel to catch newly added appointments and any changes in appointments in the UI.
but i found that CollectionChanged event fires just when user double click the ScheduleView and Add new appointment window appears (but before entering any info.) so in CollectionChanged handler I got empty appointment object .

any ideas please ??

1 Answer, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 07 Oct 2011, 02:55 PM
Hi Xiao,

RadScheduleView uses CollectionView to manage the data operations -adding ,editing, deleting of appointments.When a dialog is opened a new appointment is created (this is needed for displaying the corresponding properties of appointment in the dialog) via the CreateNew() method of collection view. That is why the collection is updated and CollectionChanged events fires. This is the default behavior of CollectionView. If the creating an appointment via dialog is canceled the newly created appointment will be removed from the collection.

Best wishes,
Rosi
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
ScheduleView
Asked by
Xiao
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Share this question
or