I have a bound CalendarInfo for Appointments and Owners. The appointments are displayed in an UltraDayView. In one use case Users are not able to move, resie or Edit appointments in the UltraDayView I only wnat them to be able to select multiple appointments which then opens another screen where the user can do a next/ prev function to move through a person employess records for the Person that each one of the previously selected appointments relates to. I am useing the DataKey to hold the PersonId Key.
While the user can select multiple appointments it is very cumbersome to make them click seperately on each and every appointment to set its as being selected. I thought that clicking on an appointment and then pressing down the Shift Key and then the last appointment in teh day View that I want (say the first one is at 09:00 and the last one at 13:00 would select all the appointments in between 09:00 and 13:00 but it doesn't. The user is forced to click on each and every appointment starting at 09:00 and until 13:00. Is there someway that you can advise me of how to achieve this please? What is the benefit of extended under
With UltraCalendarInfo1 .AllowAllDayEvents = False .AllowRecurringAppointments = False 'Disallow RecurringAppointments .SelectTypeActivity = UltraWinSchedule.SelectType.Extended .EventManager.CalendarInfo.SelectTypeActivity = UltraWinSchedule.SelectType.Extended End WithThank you
HI Mike
Sorry that it has taken me a few days to get back to you. with this specified
Dim startDate As DateTime = UltraCalendarInfo1.SelectedAppointments.Cast(Of Appointment).Min(Function(app) app.StartDateTime)
the solution build fails unless I Import System.Linq which I didn't think was relevant and had been removed by a VS2015 remove unused References
Regards and Thanks
Stephen
Stephen Kalyniuk said:fails to compile
Can you be more specific? What error message are you getting?
After loading Winforms 19.1, including the rebuild to release 19.1.20191.82 compiling on .Net framework 4.0 this line now fails to compile
Dim endDate As DateTime = UltraCalendarInfo1.SelectedAppointments.Cast(Of Infragistics.Win.UltraWinSchedule.Appointment).Max(Function(app) app.StartDateTime)
Please advise
Hello ,
Thank you for your feedback. I am glad to hear that my code woks for you.
Thank you for using Infragistics Components.
Thanks Hristo. You have been of great help to me with the example that you sent! I meant to update the post earlier.
Like you I also thought that is was a .Net 2 vs .Net 4 issue. However what actually overcame it was importing the System.Linq namespace
after which CAST appeared as a method in the SelectedAppointments object. It is working fine in my project now.
Regards and thanks