I have many customers that have hundreds of jobs scheduled on their calendars and looking for one by the project number without knowing what day it's on can be a daunting task.
I wanted to write a search that they can type in a project number and have it go to the first appointment matching. I can loop through the appointments and find the one I want and set the selected property, but there doesn't seem to be a way to ensure that it is visible in the calendar. Can anyone shed some light on how to do this?
Thanks
Hello,
Thank you for contacting Infragistics.
How you do this depends on the WinSchedule control you're using. For the UltraDayView you can set the selected date to the date the appointment falls on and then call EnsureTimeSlotVisible() and pass in the starting time of the appointment.
My customers use all of the calendars (we went with your example of using a tab control to let users switch between them). So, is there any example of how to do this for the other types of calendars? I didn't see a SelectedDate property on the MonthViewSingle control or WeekView. I did see a Day property, but the appointment has a StartDate and time that is not of the same type as the Day of a calendar
Thank you. I found that a couple days after asking... I forgot to post. I appreciate your help.
Thank you for your response.
While researching this I discovered an easier way to scroll the appointment into view that will work for all WinSchedule controls that are bound to the same UltraCalendarInfo object.
You can use code similar to the following.
Dim day = UltraCalendarInfo1.GetDay(appointment.StartDateTime)UltraCalendarInfo1.ActiveDay = day
Please let me know if you have any other questions about this.