Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Select Range of Events by Date
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Select Range of Events by Date

 Post Reply Post Reply
Author
Message
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Topic: Select Range of Events by 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
Back to Top
wlcabral View Drop Down
Groupie
Groupie
Avatar

Joined: 25 April 2007
Location: Brazil
Status: Offline
Points: 72
Post Options Post Options   Thanks (0) Thanks(0)   Quote wlcabral Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post 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!
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.949 seconds.