Hi, I feel I am missing something here re the planner control and not understanding the connection and would appreciate any help on offer.
I have two calendar, one in month view and one in timetableview.
The monthview calendar is only used to select a date and display in highlight if an appoint exists on a given date.
The timetableview calendar moves to the date selected on the monthview calendar and allows the user to drag entries from a combobox onto it to create appointments.
When appointments are created or deleted the monthview calendar is updated accordingly.
The problem is that when I first open the application the timetableview calendar is correctly updated from the underlying database by way of the LoadFromDatasource() method.
But the monthview calendar does not get updated thus resulting in no higlights to show where appointments exist.
I then thought I needed of course to call the LoadFromDatasource() method of the monthview calendar but I get this error:
Item has already been added. Key in dictionary:
'MindFusion.Scheduling.Appointment' Key being added:
'MindFusion.Scheduling.Appointment'
Here is the code for the refresh button I use to test it:
If MessageBox.Show("Refreshing delivery schedule from database will overwrite displayed schedule, do you wish to continue.", "Confirm Refresh", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = Windows.Forms.DialogResult.Yes Then
Me.calTimeTableView.Schedule.Clear()
Me.PlannerSQLDataSet.Reminder.Clear()
Me.PlannerSQLDataSet.Style.Clear()
Me.PlannerSQLDataSet.CustomBrushes.Clear()
Me.PlannerSQLDataSet.Contact.Clear()
Me.PlannerSQLDataSet.Location.Clear()
Me.PlannerSQLDataSet.Resource.Clear()
Me.PlannerSQLDataSet.Task.Clear()
Me.PlannerSQLDataSet.Item.Clear()
Me.PlannerSQLDataSet.ItemContacts.Clear()
Me.PlannerSQLDataSet.ItemResources.Clear()
Me.PlannerSQLDataSet.Recurrence.Clear()
Me.PlannerSQLDataSet.RecurrenceException.Clear()
Me.PlannerSQLDataSet.RecurrenceExceptions.Clear()
Me.ReminderTableAdapter1.Fill(Me.PlannerSQLDataSet.Reminder)
Me.StyleTableAdapter1.Fill(Me.PlannerSQLDataSet.Style)
Me.CustomBrushesTableAdapter1.Fill(Me.PlannerSQLDataSet.CustomBrushes)
Me.ContactTableAdapter1.Fill(Me.PlannerSQLDataSet.Contact)
Me.LocationTableAdapter1.Fill(Me.PlannerSQLDataSet.Location)
Me.ResourceTableAdapter1.Fill(Me.PlannerSQLDataSet.Resource)
Me.TaskTableAdapter1.Fill(Me.PlannerSQLDataSet.Task)
Me.ItemTableAdapter1.Fill(Me.PlannerSQLDataSet.Item)
Me.ItemContactsTableAdapter1.Fill(Me.PlannerSQLDataSet.ItemContacts)
Me.ItemResourcesTableAdapter1.Fill(Me.PlannerSQLDataSet.ItemResources)
Me.RecurrenceTableAdapter1.Fill(Me.PlannerSQLDataSet.Recurrence)
Me.RecurrenceExceptionTableAdapter1.Fill(Me.PlannerSQLDataSet.RecurrenceException)
Me.RecurrenceExceptionsTableAdapter1.Fill(Me.PlannerSQLDataSet.RecurrenceExceptions)
Me.calTimeTableView.LoadFromDataSource()
Me.calMonthView.LoadFromDataSource()
MessageBox.Show("The delivery schedule has been refreshed", "Successful Refresh", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
Have I totally misunderstood how these things work?
Thanks