Hi,
I have created appointment and resource property mappings for my ListScheduleDataConnector:
<ig:ListScheduleDataConnector x:Name="lsdMyTasks" > <ig:ListScheduleDataConnector.ResourcePropertyMappings> <ig:ResourcePropertyMappingCollection> <ig:ResourcePropertyMapping ResourceProperty="Id" DataObjectProperty="UserId"/> <ig:ResourcePropertyMapping ResourceProperty="Name" DataObjectProperty="FullName"/> </ig:ResourcePropertyMappingCollection> </ig:ListScheduleDataConnector.ResourcePropertyMappings> <ig:ListScheduleDataConnector.AppointmentPropertyMappings> <ig:AppointmentPropertyMappingCollection> <ig:AppointmentPropertyMapping AppointmentProperty="Start" DataObjectProperty="RequiredDate"/> <ig:AppointmentPropertyMapping AppointmentProperty="Description" DataObjectProperty="TaskTypeName"/> <ig:AppointmentPropertyMapping AppointmentProperty="End" DataObjectProperty="TaskEndTime"/> <ig:AppointmentPropertyMapping AppointmentProperty="Id" DataObjectProperty="TaskId"/> <ig:AppointmentPropertyMapping AppointmentProperty="OwningResourceId" DataObjectProperty="AssignedUserId"/> </ig:AppointmentPropertyMappingCollection> </ig:ListScheduleDataConnector.AppointmentPropertyMappings> </ig:ListScheduleDataConnector> <ig:XamScheduleDataManager x:Name="xsdMyTasks" DataConnector="{Binding ElementName=lsdMyTasks}"/>
<ig:XamDateNavigator x:Name="xDateNav" AllowLeadingAndTrailingGroupActivation="False" Dimensions="1,1" AutoAdjustDimensions="False" VerticalAlignment="Top" TodayButtonVisibility="Visible" Margin="0,40,0,0" HighlightDayCriteria="DaysWithActivity" DataManager="{Binding ElementName=xsdMyTasks}"/>
<ig:XamOutlookCalendarView x:Name="xocMyTasks" Grid.Row="1" DateNavigator="{Binding ElementName=xDateNav}" DataManager="{Binding ElementName=xsdMyTasks}"/>
Which I populate in code with entities from the database:
Private Sub MyTasksLoaded(lo As loadoperation) If lo.HasError Then lo.MarkErrorAsHandled() MessageBox.Show(String.Format("Error loading my tasks: {0}", lo.Error.Message)) Else lsdMyTasks.AppointmentItemsSource = Nothing lsdMyTasks.AppointmentItemsSource = lo.Entities.OfType(Of Data.Task).ToList lsdMyTasks.ResourceItemsSource = New List(Of User) From {LoggedInUser} xsdMyTasks.CurrentUserId = LoggedInUser.UserId End If End Sub
However I still can't see any of these appointments highlighted in my DateNavigator, or within the xamOutlookCalendarView that I am using. What am I missing here?
Hello,
I am just checking if you require any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thank you for your post. I have been looking into the code snippets that you have provided me with and it seems that the reason the behavior that you are getting is that, when you are using XamShcedule, you should set the ResourceCalendarItemsSource property of the ListScheduleDataManager and also add a mappings in the ResourceCalendarPropertyMappings collection. I can suggest referring to the following article, which describes how you can use mappings to the ListScheduleDataManager and also, which fields are required for the mappings: https://help.infragistics.com/Doc/Silverlight/2011/1/CLR4.0/?page=xamSchedule_Using_Connector_Mapping.html
If you need any further assistance on the matter, please do not hesitate to ask.