Multiple Resources |
Post Reply |
Author | ||
Fabian
Senior Member Joined: 22 November 2004 Location: Switzerland Status: Offline Points: 336 |
Post Options
Thanks(0)
Posted: 30 April 2006 at 11:19am |
|
Hi I try to incorporate multiple resources in my (working) calendar app. CalendarControl1.SetDataProvider(...) '----- New code 'Now adding events to CalendarControl1.DataProvider as before. If we run the app with the new code the resource was shown but the DataProvider is empty and inplace adding an event was no more possible... without the resource addition all work as expected but without resources... What do I wrong? Thanks a lot for any help! |
||
Product: Xtreme SuitePro (ActiveX) version 16.2.3
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 / SP6 |
||
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
|
Hi Fabian,
Firstly please look at corresponding examples in calendar VB sample project: mnuMultiSchedulesSimple_Click() mnuMultiSchedulesExtended_Click() 1. instead of Resource.ScheduleIDs.Add 1 use: Resource.ScheduleIDs.Add Schedules.Item(0).Id 2. instead of Schedules.AddNewSchedule "Test" use: If Schedules.Count < 1 Then Schedules.AddNewSchedule "Test" End If because XML/file data provider saves/loads schedules when Save/Open methods are called. 3. Resource.SetDataProvider(CalendarControl1.DataProvider, False) NOTE: if you set False to bCloseDataProviderWhenDestroy - please close (and save if necessary) a DataProvider manually when exit from app/form. 4. for events which you add you have to set ScheduleID. 5. Look also at CalendarResource.SetDataProvider2 method. -- WBR, Serge |
||
WaaZ
Senior Member Joined: 31 January 2006 Location: United Kingdom Status: Offline Points: 103 |
Post Options
Thanks(0)
|
|
Hi, Based on the explanation above, I have implemented the following code:
and when I create my event after the above has been executed and set the Schedule ID as follows:
I see no difference in the execution. I have done these changes in the sample code given while installing the controls |
||
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
|
Ensure you've called:
Compare your code with code in calendar VB sample project: mnuMultiSchedulesSimple_Click(); -- WBR, Serge |
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |