Hi,I want to bind custom objects (database entities) to a MonthView.I took the code snippet from "xamSchedule" > "xamSchedule" > "Using code behind"to set up the ListScheduleDataConnector. I want only one calendar per resource,so I commented out the ResourceCalendarPropertyMappings.Neither the following xaml nor the original one work. I get the error Message:Application configuration error. The functionality is not supported.Error Details:The following property mappings are missing for ActivityBase items:IdOwningResourceIdStartEndMy xaml looks like this: <ig:ListScheduleDataConnector x:Name="scheduleDataConnector" ResourceItemsSource="{Binding Resources}" AppointmentItemsSource="{Binding Appointments}"> <!--ResourceCalendarItemsSource="{Binding Calendars}"--> <ig:ListScheduleDataConnector.ResourcePropertyMappings> <ig:ResourcePropertyMappingCollection> <ig:ResourcePropertyMapping ResourceProperty="Id" DataObjectProperty="LDD_ID" /> <ig:ResourcePropertyMapping ResourceProperty="Name" DataObjectProperty="ANZEIGEWERT" /> </ig:ResourcePropertyMappingCollection> </ig:ListScheduleDataConnector.ResourcePropertyMappings> <!--<ig:ListScheduleDataConnector.ResourceCalendarPropertyMappings> <ig:ResourceCalendarPropertyMappingCollection> <ig:ResourceCalendarPropertyMapping ResourceCalendarProperty="Id" DataObjectProperty="CalendarId" /> <ig:ResourceCalendarPropertyMapping ResourceCalendarProperty="Name" DataObjectProperty="CalendarName" /> <ig:ResourceCalendarPropertyMapping ResourceCalendarProperty="OwningResourceId" DataObjectProperty="DeviceId" /> </ig:ResourceCalendarPropertyMappingCollection> </ig:ListScheduleDataConnector.ResourceCalendarPropertyMappings>--> <ig:ListScheduleDataConnector.AppointmentPropertyMappings > <ig:AppointmentPropertyMappingCollection> <ig:AppointmentPropertyMapping AppointmentProperty="Id" DataObjectProperty="LDE_ID" /> <ig:AppointmentPropertyMapping AppointmentProperty="Start" DataObjectProperty="START_DATE" /> <ig:AppointmentPropertyMapping AppointmentProperty="End" DataObjectProperty="END_DATE" /> <ig:AppointmentPropertyMapping AppointmentProperty="OwningResourceId" DataObjectProperty="LDD_LDD_ID" /> <!--<ig:AppointmentPropertyMapping AppointmentProperty="OwningCalendarId" DataObjectProperty="LDD_LDD_ID" />--> <ig:AppointmentPropertyMapping AppointmentProperty="Subject" DataObjectProperty="KOMMENTAR" /> <ig:AppointmentPropertyMapping AppointmentProperty="Description" DataObjectProperty="KOMMENTAR" /> </ig:AppointmentPropertyMappingCollection> </ig:ListScheduleDataConnector.AppointmentPropertyMappings> </ig:ListScheduleDataConnector>I suppose the error message refers to the Appointment mapping. But I do not understand the error message because the xaml specifies the properties mentioned in the error message.What am I missing here?One more question: My objects' Ids are decimal and my DateTimes are nullable - do I need to use converters?Cheers, crs
Yes, this can easily be done with a behavior or attached property. I have modified the sample to be more MVVM friendly, and to use an attached property to data bind to the InitialCalendarIds. Of course, you need to customize this to meet your needs.
<ig:XamScheduleDataManager x:Name="dataManager" DataConnector="{Binding ElementName=scheduleDataConnector}"
common:CalendarGroup.InitialCalendarIds="{Binding InitialCalendarIds}">
<ig:XamScheduleDataManager.Settings>
<ig:ScheduleSettings WorkDays="Monday, Wednesday, Friday, Saturday"/>
</ig:XamScheduleDataManager.Settings>
</ig:XamScheduleDataManager>
Hello,
I am following up on this issue as we need to produce dynamically defined Calendar Groups based on a user's view configuration. Has this issue been addressed in subsequent releases? Can you possibly provide a workaround that does not involve hard coding the initialcalendarids in the xaml or code behind?
Thanks,
David
I am just checking if you need any further assistance on the matter.
The InitialCalendarIds Property of the CalendarGroup class is not a DependacyObject and you are not allowed to bind it. You can log a product idea for this here:
http://ideas.infragistics.com/
Thanks a lot. That definitely helps me.
But I have one more issue: The initial calendar ids are hard coded as a string. I tried to use binding instead, But binding to a string with the same content does not work. Is there a way to use binding to set the initial calendar ids?