I'm using ExchangeScheduleDataConnector to connect to Exchange 2010. The connection works just fine and I can see and edit appointments on the main calendar with no problems.
This user has multiple calendars though, and I want to see all of them.
Is there a way to retrieve all the calendars for a user?
Any help would be appreciated.
After the user has been loaded, you can find the Resource for the user in the connector's ResourceItems collection. That resource has a Calendars collection which contains all calendars retrieved from the server for that user.
Thanks for the quick reply. Didn't notice it till tonight. Since I was expecting to see an email if the post was updated or replied to, I wasn't checking it here.
I think I already checked what you're suggesting and the calendars collection was null but I'll have to double check that when I'm back on the project again on Thursday.
Hi,
You're very welcome. Just let me know if you have further questions.
I'm also not finding the exchange calendar groups.
You could hook the exchange connector's ResourceItems.CollectionChanged event. This will tell you when resources (users) have been created, had their calendars downloaded, and been added to the ResourceItems collection. Then you could do something like this to add all downloaded calendars into a group:
void ResourceItems_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e){ int count = this.ExchangeConnector.ResourceItems.Count; if (count > 0) { this.DataManager.CalendarGroups.Clear();
CalendarGroup group = new CalendarGroup(); foreach (Resource resource in this.ExchangeConnector.ResourceItems) { foreach (ResourceCalendar resourceCalendar in resource.Calendars) group.Calendars.Add(resourceCalendar); }
this.DataManager.CalendarGroups.Add(group); }}
CollectionChangedEvent works fine. Thanks!
Let me restate my other question.
I understand how to use Infragistics CalendarGroups and your example above is quite clear. I'm actually wanting something different.
The user has multiple calendars that are grouped in exchange (or at least they show grouped in Outlook). While I can retrieve all the calendars from exchange just fine (thanks to your previous help!), and can also split them into as many groups as I want, I haven't yet found a way to detect how exchange has them grouped.
Any Ideas?
I'm not sure if this is possible because I believe the group and visibility information is stored by Outlook, not Exchange. I believe this is the case because if I create a few calendars and group and show/hide them in Outlook, then open my email web access, I see a different set of calendars shown.
Thanks Mike!
I'll check it out.
Please let us know if you have any further questions.
I put together a quick sample you might be able to use to get the order of calendars from Exchange. Since you cannot access the Exchange service from the connector, it requires installing the Exchange Web Services Managed API, which can be found here: http://www.microsoft.com/en-us/download/details.aspx?id=28952 and including the installed DLL in your application. I added TODO notes in the code where you need to make changes in order to use it in your application.
Mike asked that I submit a product idea for you; loading exchange grouping data from Exchange 2010 and later thru the ExhangeScheduleDataConnector. I have submitted your idea directly to our Product Management team.
Our product team chooses new feature requests for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your features are chosen for development you will be notified at that time. Your reference number is PI12050021. If you need any further assistance please do not hesitate to ask.
I just did some research on this and I see that you are correct. It is possible to access the grouping data from Exchange 2010 and later. Having the connector load this information from the server is a feature request. I have forwarded this post to the Developer Support Manager to create a feature request on your behalf.