Has anybody had any luck adding multiple resources to a CodeJock Calendar control? Multiple resources is a way to have multiple schedules for multiple people. I was successful creating it, but it doesn't show appointments. It's all blank. Here is my code:
- Code: Select all Expand view
IF !EMPTY( ::aSchedules )
::oSchedules := ::oCalex:DataProvider:Schedules()
aEval( ::aSchedules, { |e, n| ;
::oSchedules:AddNewSchedule( e ),;
oResDesc := ::CreateScheduleResource(),;
oResDesc:SetDataProvider( ::oCalex:DataProvider, .F. ),;
oResDesc:Name( e ),;
oResDesc:ScheduleIDs:Add( ::oSchedules:Item( n-1 ):Id() ),;
::oCalexResources:Add( oResDesc ) } )
::oCalex:SetMultipleResources( ::oCalexResources )
ENDIF
::oCalex:Populate()
::oCalex:RedrawControl()
[img]
http://ssfl.dynalias.com/temp_files/CJ_CalendarScreenShot.png
[/img]
Reinaldo.