I am binding a Timeline control to a CalendarInfo object. The DataSource for the CalendarInfo object is set to a dataview. I fill my dataset and the appointments for the items already in the dataset appear properly. However, I then add rows to my underlying dataset in code and the appointments never appear. I have tried calling the RefreshData method on the CalendarInfo object and that doesn't work. The rowstate of the new rows are Added, but even after calling the AcceptChanges on the datatable, they still don't appear. I have also tried removing the datasource from the CalendarInfo object and resetting it to a new instance of a dataview and that hasn't worked either.
Any ideas on how to get these appointments to appear? My code to bind the CalendarInfo object is below. Again, there only seems to be a problem with Added records. My rowstatefilter on the dataview is Current, so the Added records should appear.
Me.CalendarInfo1.DataBindingsForAppointments.DataSource = Me.dvScheduleDetail
Me.CalendarInfo1.DataBindingsForAppointments.BindingContextControl = Me
Me.CalendarInfo1.DataBindingsForAppointments.AllPropertiesMember = "All_Properties"
Me.CalendarInfo1.DataBindingsForAppointments.DataKeyMember = "Schedule_Detail_ID"
Me.CalendarInfo1.DataBindingsForAppointments.DescriptionMember = "Step_Description"
Me.CalendarInfo1.DataBindingsForAppointments.EndDateTimeMember = "Scheduled_End_Date" Me.CalendarInfo1.DataBindingsForAppointments.OriginalStartDateTimeMember = "Original_Scheduled_Start_Date" Me.CalendarInfo1.DataBindingsForAppointments.OwnerKeyMember = String.Empty
Me.CalendarInfo1.DataBindingsForAppointments.StartDateTimeMember = "Scheduled_Start_Date"
Me.CalendarInfo1.DataBindingsForAppointments.SubjectMember = "Subject"
Me.dvScheduleDetail in the above code is set to Me.dvScheduleDetail = Me.dsDataEntryItem.Tables("Schedule_Detail").DefaultView elsewhere in my code.
Richard,
I am working on a sample to check this out. I will get back to you later this week.
Finally figured this one out! If the Subject field is not set on an appointment, it won't appear in the Timeline. I'm not sure why this matters since the start and end dates are set properly, but if subject is not set, it doesn't appear for me. I will make sure I'm setting that field to something in my code from now on.
Well, I was mistaken. It turns out that my sample application does not reproduce the issue. I have attached my sample application to this forum thread and I find that when I add an appointment to the underlying data the new appointment does appear in the TimelineView. Please take a look at this sample and let me know if I am doing something very different from what you are doing. I hope to hear back from you soon.
Great news! Hopefully, it's an easy fix for them.
I have reproduced the behavior and I have submitted this issue to our developers for further review. The reference number for this development item is 149903. A support case has also been opened for the and you will receive more information on this case through the support case. The reference number for the support case is CAS-121907-P4F5L6.