Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
xamSchedule - bind to custom objects - missing property mappings
posted

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:
Id
OwningResourceId
Start
End

My 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

Parents Reply Children