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
This is actually something we just added in 11.1. We added 2 new schedule controls - xamDateNavigator and xamOutlookCalendarView.
xamDateNavigator is a month calendar similar to the xamMonthCalendar that integrates with the schedule datamanager and has the ability to display bold for dates with activity of the CurrentUser of the xamScheduleDataManager and also can show the activity for a given date in the tooltip for that day.
xamOutlookCalendarView is a composite control that contains day/month/schedule view and switches between the views based on interaction with the control similar to that of Outlook - e.g. clicking on a week header in the month view shifts to week view for that week, clicking a day header in month/day/week view shifts to day view for that day, keyboard shortcuts can switch between modes, and the modes can automatically switch between day/schedule view based on the number of calendars visible (just as they do in outlook). In addition the control exposes a property named DateNavigator that is used to synchronize selection between a month calendar control and the outlook calendar view similar to that of outlook. You can set this property to an instance of a xamDateNavigator (i.e. you would set this property to a Binding whose ElementName is the xamDateNavigator you have within your ui).
Thanks Much! That sure makes it a lot cleaner.
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,
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.
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.
Thanks much for the sample project.
Apparently I had the wrong color property, i was using System.Drawing.Color.
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.
Thank You,
Thanks.That worked.
hariharan019 said: am also having an issue while removing a resource from the list at runtime. I assume that the scheduler supports adding and removing resources and resource calendars at runtime ?
Yes resources may be removed and the ui should be updated. It could be the same type of timing issue you had with adding the resources. If you still have an issue then please post an updated sample that demonstrates the issue with removing the resources.
hariharan019 said: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
private void OnCalendarsChanged(object sender, NotifyCollectionChangedEventArgs e) { this.Dispatcher.BeginInvoke(new NotifyCollectionChangedEventHandler(this.OnCalendarsChangedImpl), sender, e); } private void OnCalendarsChangedImpl(object sender, NotifyCollectionChangedEventArgs e) { /// this is where you do what you originally had in the OnCalendarsChanged...
private void OnCalendarsChangedImpl(object sender, NotifyCollectionChangedEventArgs e) { /// this is where you do what you originally had in the OnCalendarsChanged...
I am also having an issue while removing a resource from the list at runtime. I assume that the scheduler supports adding and removing resources and resource calendars at runtime ?
Please review the sample project attached in my previous post and suggest a response.
Have you had a chance to look at my attached sample project?