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

Updating appointments with TableAdapters

4 Answers 189 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
FB
Top achievements
Rank 1
FB asked on 28 Jun 2011, 07:33 PM
Hello,

I have a form that uses databinding using Dataset/TableAdapter for the Appointments. I have one table - Appointments. If I were to use a button to update the dataset to persist the data, will I still need to hit the "Ok" button before I hit the Update button? I am using the Timeline view and it displays the appointments from table correctly. However, after dragging to new start and end date, I have to select "All day event" then hit Ok and then the update button before my changes are saved.

What am I doing wrong?



Thanks.

4 Answers, 1 is accepted

Sort by
0
Ivan Todorov
Telerik team
answered on 29 Jun 2011, 11:15 AM
Hello FB,

Thank you for your question.

There is a known issue in RadScheduler with updating the data source when changing appointments' start date via drag and drop. By hitting the 'All Day Event' you force an update of the data item and that is why this saves your changes. We will try to address this issue in the upcoming Q2 release. For the time being, I can only suggest you to change appointments' start date through the appointment edit dialog.

I hope this helps.

Best wishes,
Ivan Todorov
the Telerik team
Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
0
FB
Top achievements
Rank 1
answered on 29 Jun 2011, 03:12 PM
Thanks Ivan,

Can I not, somehow, make use of the move, resize events if they exist? Check if the start/end dates have changed and save to database?


Thanks
FB
0
Ivan Todorov
Telerik team
answered on 30 Jun 2011, 12:36 PM
Hi Fb,

I have made some further investigations on this case and I have managed to think of a workaround. It handles the Appointments.CollectionChanged event and updates the appointments manually. The following code snippet demonstrates this:
AddHandler Me.RadScheduler1.Appointments.CollectionChanged, AddressOf Appointments_CollectionChanged
 
 
Private Sub Appointments_CollectionChanged(sender As Object, e As Telerik.WinControls.Data.NotifyCollectionChangedEventArgs)
    If e.Action.Equals(Telerik.WinControls.Data.NotifyCollectionChangedAction.Batch) Then
        For i As Integer = 0 To Me.radScheduler1.Appointments.Count - 1
            Dim app As IEvent = Me.radScheduler1.Appointments(i)
            Me.radScheduler1.DataSource.GetEventProvider().Update(app, "Start")
            Me.radScheduler1.DataSource.GetEventProvider().Update(app, "End")
            Me.radScheduler1.DataSource.GetEventProvider().Update(app, "Duration")
        Next
    End If
End Sub

The issue will most probably be addressed in the upcoming Q2 release. For the time being, I hope this will help you.

If you have any further questions, feel free to ask.

Best wishes,
Ivan Todorov
the Telerik team
Registration for Q2 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting July 18th and book your seat for a walk through all the exciting stuff we ship with the new release!
0
FB
Top achievements
Rank 1
answered on 30 Jun 2011, 02:28 PM
Hi Ivan,

Thanks for your prompt reply. Yes it does! As a matter of fact I made use of the AppointmentMouseUp event. Wrote a function that makes call to the database. This way the appointments are saved everytime they are dragged or moved.

Regards and looking forward to Q2 release.

FB
Tags
Scheduler and Reminder
Asked by
FB
Top achievements
Rank 1
Answers by
Ivan Todorov
Telerik team
FB
Top achievements
Rank 1
Share this question
or