Right now, I have attached properties added to the month calendar control and based on the dates that are selected, i am switching the different schedule views and clearing the visible days and updating it with the selected date range.
Please Suggest.
Thanks in advance,
Hariharan
I tried this out and the BaseColor is working correctly. I've attached a sample that demonstrates this working. If you still have an issue then please provide a sample that demonstrates the issue.
I also tried doing the custom proeprty mapping .That did not help either. It is not picking the color property value .
The only other option that i see is to manually create ResourceCalendars in code from my custom list and assign it to the datamanager. That way I can assign the color of the Calendar in code. But this wont be clean.
Is there something that I should be doing in the xaml while doing property mapping so that it pick the color property. Also since my entity has the same property names as the Infragistics ResourceCalendars , I should just be using the UseDefaultValues. It picks other attributes like Id,Name but not BaseColor.
Ok, I added code to internally populate calendar groups.
All my custom objects have the same property names as the Infragistics entities for Resources,ResourceCalendars and Appointments. And in the ListScheduleDataConnector I am setting the "UseDefaultMapping" to TRUE. This picks all required properties, however, to display the calendar, it is not picking the BaseColor Property from my entity, event though I have it populated it with my custom color.
ThankYou,
hariharan019 said:Also, I need to display multiple resources , which means multiple calendars. Do i need to set CurrentUser and CalendarGroupCollections?
The CurrentUser(Id) is used to determine the primary user and affects things like the reminders. Also when no CalendarGroups are provided it is the PrimaryCalendar of the CurrentUser that is displayed. If you want to display multiple calendars then you need to put CalendarGroup instances in the CalendarGroups of the xamScheduleDataManager or the CalendarGroupsOverride of the view control. The various requirements for the schedule controls are described here.
hariharan019 said:Shouldn't it internally populate the calendar groups based on the resource calendars?In my case, since its a wrapped user control, there is no direct way for me to set those.
The control does not assume that all the calendars should be displayed. If you want to make that assumption then perhaps you can handle the 1st time the Loaded event is raised (it can be raised multiple times by the wpf framework) and then enumerate your resource calendars and create 1 or more calendar groups to contain them. Calendar groups are discussed in the help here.
I believe you still need to provide the property mappings even if you are using our objects - e.g.
<Schedules:ListScheduleDataConnector.AppointmentPropertyMappings> <Schedules:AppointmentPropertyMappingCollection UseDefaultMappings="true" /></Schedules:ListScheduleDataConnector.AppointmentPropertyMappings> <Schedules:ListScheduleDataConnector.ResourcePropertyMappings> <Schedules:ResourcePropertyMappingCollection UseDefaultMappings="true" /></Schedules:ListScheduleDataConnector.ResourcePropertyMappings> <Schedules:ListScheduleDataConnector.ResourceCalendarPropertyMappings> <Schedules:ResourceCalendarPropertyMappingCollection UseDefaultMappings="true" /></Schedules:ListScheduleDataConnector.ResourceCalendarPropertyMappings>
<Schedules:ListScheduleDataConnector.ResourcePropertyMappings> <Schedules:ResourcePropertyMappingCollection UseDefaultMappings="true" /></Schedules:ListScheduleDataConnector.ResourcePropertyMappings>
<Schedules:ListScheduleDataConnector.ResourceCalendarPropertyMappings> <Schedules:ResourceCalendarPropertyMappingCollection UseDefaultMappings="true" /></Schedules:ListScheduleDataConnector.ResourceCalendarPropertyMappings>
Note you still need to set the CurrentUserId to the id of the Resource that represents the current user or some functionality (like reminders, etc.) will not be functional. The CurrentUserId is also used to determine the default calendar that is displayed when no CalendarGroups have been provided. If you want to show multiple calendars then you need to populate the CalendarGroups.