Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Removing all resources
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Removing all resources

 Post Reply Post Reply
Author
Message
WaaZ View Drop Down
Senior Member
Senior Member


Joined: 31 January 2006
Location: United Kingdom
Status: Offline
Points: 103
Post Options Post Options   Thanks (0) Thanks(0)   Quote WaaZ Quote  Post ReplyReply Direct Link To This Post Topic: Removing all resources
    Posted: 03 May 2006 at 12:09pm

Hi,

I have somewhere in my code that i need to erase every thing from the calendar. It was working with the previous version 9.8.2 and also 10.1.1 with

Quote

CalendarControl.DataProvider.RemoveAllEvents()

Until i have to remove the resources also.. and I used:

Quote

CalendarControl.MultipleResources.RemoveAll()

What happen is that the Dataprovider is then set to NULL after i execute this line... Which is wrong since there is no use to do such a thing as far as I see. This may be the case because you set the MultipleResources[counter].SetProvider(null) maybe or something similar...

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 04 May 2006 at 8:20am

Yes, that's true. And what is the problem?

Let me add some notes:

1. Important.

   Do not modify CalendarControl.MultipleResources collection directly - use SetMultipleResources method.

   See points 3, 4 for reasons.
 
Example:
  
Dim arRes as new CalendarResources
     <fill new resources configuration>
     <use CalendarControl.MultipleResources if need>
  CalendarControl.SetMultipleResources arRes

2. Multiresources is not a separate feature, this is a significant part of CalendarControl kernel.

   CalendarControl.SetDataProvider sets a single resource with empty schedules ID collection and creates a data provider for it.     

   CalendarControl.DataProvider is the same as CalendarControl.MultipleResources[0].DataProvider 

   So far, a DataProvider lives in a Resource. That means that each resource can have a separate data provider -- other file or of any other type (DB, MAPI, CUSTOM).

3. CalendarView-s also have MultipleResources and SetMultipleResources members.

   This can be used to have main resources/schedules configuration in the CalendarControl, and to set a particular configuration to each view. If MultipleResources for a view is not set - CalendarControl.MultipleResources are used by a view by default.

    CalendarControl.SetMultipleResources resets view's MultipleResources.

4. CalendarReminders manager works using CalendarControl.MultipleResources. When you call CalendarControl.SetMultipleResources - reminders manager is restarted with the new configuration.

--
WBR,
Serge
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.