Print Page | Close Window

ScheduleID

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=4381
Printed Date: 24 June 2024 at 7:37am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: ScheduleID
Posted By: mengo
Subject: ScheduleID
Date Posted: 09 June 2006 at 7:21am

Hi to all. I'am new there...

I've an easy question... In a calenda with multiple schedule, Can I retrive a scheduleid without selecting an event on my calendar control?

Grazie,

Mengo, Italy.




Replies:
Posted By: sserge
Date Posted: 09 June 2006 at 8:39am
Welcome here 

You can access ScheduleID values in a number of ways, the most straightforward is following:

CalendarControl.DataProvider.Schedules(nIndex).Id


--
WBR,
Serge


Posted By: mengo
Date Posted: 09 June 2006 at 11:45am

... the selected scheduleId on calendarcontrl, I don't know (nIndex) value... maybe i found... CalendarControl.DataProvider.Selection.globalindex does it right?



-------------
Mengo.-


Posted By: sserge
Date Posted: 10 June 2006 at 12:01pm
what do you mean by selected scheduleId ?

.Selection.globalindex is not our member, correct one is:
CalendarControl .ActiveView.Selection.GroupIndex

Example:

nGrIndex = CalendarControl .ActiveView.Selection.GroupIndex
nSchCount = CalendarControl .ActiveView.Days(0).ViewGroups(nGrIndex).MultipleResources(0 ).ScheduleIDs.Count
If nSchCount = 1 Then
   nSelectedScheduleID = CalendarControl .ActiveView.Days(0).ViewGroups(nGrIndex).MultipleResources(0 ).ScheduleIDs(0)
ElseIf nSchCount > 1 Then
   // in this case a few schedules is shown in one group
   //
   // by default for month and week views nSchCount > 1
Else
   // nSchCount = 0
   // all schedules are shown in such group
EndIf


--
WBR,
Serge


Posted By: mengo
Date Posted: 12 June 2006 at 7:43am

I wrong...!

I wrote the post without remember the real source code...

 

Tnx!



-------------
Mengo.-



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net