Print Page | Close Window

Select Range of Events by Date

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=9350
Printed Date: 07 October 2024 at 11:16am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Select Range of Events by Date
Posted By: jpbro
Subject: Select Range of Events by Date
Date Posted: 18 January 2008 at 3:04pm
Is there a method to select a range of events by date? For example, if the user selects a range of times/dates, I would like to be able to delete any events in that range when they press the delete key.

Thanks,
JPB



Replies:
Posted By: wlcabral
Date Posted: 19 January 2008 at 1:28pm

There are a lot of ways to do this; I’m sending some information that could be useful:

 

To select events in activeView :

 

for i = 0 to xtremeCalendar.activeView.DaysCount-1

            for j = 0 to xtremeCalendar.activeView.Days(i).ViewEventsCount-1

                         xtremeCalendar.activeView.Days(i).ViewEvents(j).Selected = .t.

            next

next

 

To un-selects all of the events of the current view :

 

xtremeCalendar.activeView.UnselectAllEvents()

 

To delete selected events:

oEvents = xtremeCalendar.ActiveView.GetSelectedEvents

For c=0 To oEvents.Count-1

oCalendar.dataProvider.DeleteEvent( oevents.ViewEvent(c).Event )

Next



Posted By: jpbro
Date Posted: 19 January 2008 at 2:45pm
Hi wlcabral,
Thanks a lot for your input on my last three questions, it was very helpful!
I figured there must be a way to loop through events, I was looking for an Events collection...didn't think of ViewEvents.

Thanks again!



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