Print Page | Close Window

Disable Event MultiSelection

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=9472
Printed Date: 29 September 2024 at 9:48pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Disable Event MultiSelection
Posted By: Bernie
Subject: Disable Event MultiSelection
Date Posted: 02 February 2008 at 2:42am

Dear Professionals:

I would like to know how to let users select one sngle event only in the DayView.
 
Thanks!


-------------
Bernie Ho, Planning Manager + IELTS specialist + part-time programmer
Taiwan, R.O.C



Replies:
Posted By: dentor
Date Posted: 02 February 2008 at 6:09am
Hello Bernie,
 
I think you can put theses instructions in the SelectionChanged Event of the Calendar Control to prevent the selection of a second event:
 
 Private Sub Calendar_SelectionChanged(ByVal SelType As XtremeCalendarControl.CalendarSelectionChanged)
    If SelType <> xtpCalendarSelectionEvents Then Exit Sub
Dim TotSelect As CalendarViewEvents
Dim ViewEvt As CalendarViewEvent
dim i as long
    Set TotSelect = Calendar.ActiveView.GetSelectedEvents
    If TotSelect.Count > 1 Then
        For i=0 to TotSelect.Count - 2
             TotSelect.ViewEvent(i).Selected = False
        Next
    End If
End Sub
 



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