I have a need to refresh calendar information every few minutes (or at least check for changes). The problem is that I can't find any way to refresh them. I have tried:
calInfo.DataBindingsForAppointments.RefreshData()
followed by a refresh on each of the view and nothing happens. I updated the datasets, and indeed they are updating. It just isn't making it to the calendar.
I set up the appointments part with this code:
' Set up data binding for Appointments
Dim appointmentsDataBinding As AppointmentsDataBinding = calInfo.DataBindingsForAppointments
appointmentsDataBinding.AllPropertiesMember = "AllProperties"
appointmentsDataBinding.StartDateTimeMember = "StartDateTime"
appointmentsDataBinding.EndDateTimeMember = "EndDateTime"
appointmentsDataBinding.SubjectMember ="Subject"
appointmentsDataBinding.AllDayEventMember ="AllDayEvent"
appointmentsDataBinding.OwnerKeyMember ="OwnerKey"
appointmentsDataBinding.SetDataBinding(dsAppts,"ScheduleAppointments")
appointmentsDataBinding.BindingContextControl =Me
appointmentsDataBinding.BindingContext =Me.BindingContext
I reload the dataset in a seperate function:
Private Sub LoadCalendar()
Dim SQL As String
dsAppts = Nothing
SQL ="SELECT * FROM ScheduleAppointments"
Main.db.BuildTable(SQL, dtAppts,"ScheduleAppointments", dsAppts)' Routine to build a data table and data set
calMonth.Refresh()
calDay.Refresh()
calWeek.Refresh()
End Sub
What am I missing? The data table and the dataset do update to the latest data.
Hi,
Have you been able to resolve your issue ? Please send me feedback. If you have any questions, do not hesitate to ask me
Regards
Hello Justin,
I`m not sure what exactly is your scenario. Could you please take a look at the attached projectwhere I am trying to reproduce your scenario, using SQL to get appointments from data base. In my sample I refresh the data every 5 seconds. In the attached file I have a SQL script that create and fills my test table.Please take a look at the sample and if you think that there are differences between your scenario and mine project, please feel free to modify it.Please if you have any questions, do not hesitate to aks meRegards
Hi. We have a similar problem.We have to refresh calendar information (appointments) every time we change the data of some TextBoxes, that we have acting like filters for the temp-tables linked to the datasets, but we don't know how to refresh the calendar.We are using this in the refresh method, but it's not working:DATASET dsAppointments:EMPTY-DATASET().DATASET dsOwners:EMPTY-DATASET().EMPTY TEMP-TABLE tt_appointments.EMPTY TEMP-TABLE tt_owners.THIS-OBJECT:ultraCalendarInfo1:Reset()....bindingSource1:Handle = DATASET dsAppointments:HANDLE.bindingSource2:Handle = DATASET dsOwners:HANDLE....THIS-OBJECT:panelCalendar1:DataBindingsForAppointments = bindingSource1.THIS-OBJECT:panelCalendar1:DataBindingsForOwners = bindingSource2.Thanks.