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
Please find attached the sample project. In the main window, first click on the button captioned "Load Default Values' .That will load a few resources and the calendars for those.
Next Type any name in the textbox below and click on the "Add" Button. This adds a new resource , and the calendar and creates the calendar group, but the calendar is not visible in the scheduler.
I ll post back with a sample application in a day. I also had a few other questions related to the scheduling tool which i added as seperate posts .Please Suggest responses
Thank You,
It's hard to say based on your description. As long as the item for the Resource is in the ResourceItemsSource, the item for the ResourceCalendar is in the ResourceCalendarItemsSource and the OwningResourceId of the ResourceCalendar maps to the Id of the resource then it should be displayed. I'm not sure what you mean by "not expecting the resource to have a calendar already" but if you are using ResourceCalendars then there must be an item in the ResourceCalendarItemsSource; you cannot just add a ResourceCalendar to a Resource's Calendars collection or create a ResourceCalendar on the fly and add it to the CalendarGroup. If you still have an issue please provide a sample and we can look into it further.
I am still having trouble with the calendar groups. Like i mentioned in the previous post, i am internally creating calendar groups. So after my control is loaded with a set of resource calendars, I am adding a new resource and for each newly added resource I am adding a resource calendar and also I am adding the same to calendar groups. When i go look at the colelctions in the list connector and the data manager, all lists (Resources,ResourceCalendars and CalendarGroups) show the newly added item, but the UI wont display it. All my objects have IsVisible set to true.
Should I be doing something different when i have to add new resources from runtime? The functionality I am trying to implement is similar to "Open Shared Calendars" in Outlook, where your initial view has only your calendars, but u can choose to view other people's calendars by choosing the resources and calendars. In my case, the requirement is for every resource i choose a create a new calendar, I am not expecting the resource to have a calendar already. So i am adding the resource to the resource collection , creating a resource calendar and adding to the collection and adding to the calendar group. Also note, I am using my custom object with proeprty mappings as you suggested.
The initial calendars load fine when the control is loaded.Just that when i add resources later, it will not show their calendars.
Thanks much for the sample project.
Apparently I had the wrong color property, i was using System.Drawing.Color.