I am looking for a way to Display an Employee name and then all the hours of the day beside it. The hours that are available will be a different color than the hours that are booked. I know the Day View does a lot of the code I need done, but is there any way to change it so the times are across the top? Or is there a another control/way I could be doing this. For example, I want:
Employee | 1:00 | 1:10 | 1:20 | 1:30 |
---------------------------------------------------------
John | false | true | true | false |
True and false is just in the example to show if they are available without using colors.
I would appreciate it if there is any feedback to accomplish what I need. I guess I need a time availability checker of some sort.
Thanks
jwascher said:Or is there a another control/way I could be doing this.
Regarding the "time availability" aspect of your question: The Infragistics.Win.UltraWinSchedule.Owner class (which enacpsulates the different calendars you display in the controls) exposes three properties, DateSettings, DayOfWeekSettings, and RecurringDateSettings. Each of these derive from a base class which exposes a WorkingHours collection, to which you can add TimeRange objects to define the working hours for that ownewr on that date/day of week. That class also exposes a TimeRangeAppearances collection, which you can use to arbitrarily color time slots without redefining their status as a working hour/day.
As far as determining whether an Owner is "available", the UltraTimelineView.CalendarInfo component exposes a GetAppointmentsInRange method, which takes a date/time range and returns the appointments which intersect with that range. It would then be up to you to determine what "available" means.
I have been playing around with the sample. I am just curious if I can get rid of the bar and just change the color of the squares. I need it to be easily identifiable who is scheduled and who is not by either a white square or a black square. But I would still like the tool tips to work without the bar. I am new to this control and it seems huge. Could you let me know what the best way of doing this is and maybe provide a sample code on changing the squares, etc.