Hello,
I'm setting a BindingSource to CalendarInfo.DataBindingsForAppointments for UltraDayView, and the control only displays the first item in the BindingSource. The setting is supposed to be easy, but I cannot figure out why I'm having this issue. My code looks like the following.
Private mTaskList As New EntityList(Of Task) Public mTaskBS As New BindingSource mTaskBS.DataSource = mTaskList mTaskList.ReplaceRange(mPerManager.GetEntities(Of Task)) 'Using Ideablade.PersistenceManager. The function returns EntityList
UltraCalendarInfo1.DataBindingsForAppointments.SetDataBinding(mTaskBS, "Task") UltraCalendarInfo1.DataBindingsForAppointments.BindingContextControl = Me
UltraCalendarInfo1.DataBindingsForAppointments.SubjectMember = "Subject" UltraCalendarInfo1.DataBindingsForAppointments.StartDateTimeMember = "StartDate" UltraCalendarInfo1.DataBindingsForAppointments.EndDateTimeMember = "DueDate"
uvDay.CalendarInfo = UltraCalendarInfo1 uvWeek.CalendarInfo = UltraCalendarInfo1 uvMonthSingle.CalendarInfo = UltraCalendarInfo1 uvMonthMulti.CalendarInfo = UltraCalendarInfo1 uvShared.CalendarInfo = UltraCalendarInfo1
I am wonderinf it it is just how I set the DataBindingsForAppointments, or that I am using the 3rd party product to set the BindingSource's DataSource. Please let me know if you have any idea.
Thanks.
Try putting your "SetDataBindings" call at the end of your code block.
Like such:
UltraCalendarInfo1.DataBindingsForAppointments.BindingContextControl = Me
UltraCalendarInfo1.DataBindingsForAppointments.SetDataBinding(mTaskBS, "Task")
If this still doesn't work then investigate your binding source... bind it to a datagrid and check out the contents.
You can also try: UltraCalendarInfo1.DataBindingsForAppointments.RefreshData()
This will try to synchronize your control to the datasource.
CheersAaron
Hello Aaron,
I got it work! Thanks for your advice!!!
Megumi