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

BeginEdit-Status

1 Answer 78 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Stefan
Top achievements
Rank 1
Stefan asked on 19 Sep 2011, 02:54 PM
Hi,

I have a problem with the status of BeginEdit.
My scenario:
When I start my application I fill the ScheduleView-Control with appointments (the Control is part of the startwindow).
In the Main.Loaded eventhandler I define a Eventhandler which is fired when the ScheduleViewControl is loaded.

Private Sub Event_Main_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
            AddHandler Me.radSchedBZP.Loaded, AddressOf Event_radSchedBZP_Loaded
End Sub

Inside the EventHandler Event_radSchedBZP_Loaded I fill the Control with appointments.
The Return-Value of BeginEdit is always "False". What can i do?
Dim app As Telerik.Windows.Controls.ScheduleView.Appointment = Me.radSchedBZP.CreateNew()
Dim bolIsLoaded As Boolean = Me.radSchedBZP.IsLoaded    => is true
                If Me.radSchedBZP.BeginEdit(app) Then
                    With app
                        .Subject = ...
                        .Body = ...
                         ...
                         ...
                        Me.radSchedBZP.Commit()
              endif

Thanks in advance.
kindly regards,
Stefan
 

1 Answer, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 22 Sep 2011, 10:56 AM
Hello Stefan,

RadScheduleView supports IEditableCollectionView interface to add/edit items.
One reason for the problem could be that the type of the collection that you bound to RadScheduleView's AppointmentsSource property does not support IEditableCollectionView and the CanEdit method of the view returns false. For example if you bind the AppointmentsSource property to ObservableCollection<IAppointment>() this will not work while ObservableCollection<Appointment> will work.

More about IEditableCollectionView interface you can read below:
http://msdn.microsoft.com/en-us/library/system.componentmodel.ieditablecollectionview.aspx


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
Stefan
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Share this question
or