Hello,
I have found a way to change the timeslot color for a certain time period on the dayview using the code below however when I switch to the week view the red color doesn't show up. How would I change the timeslot color in the ultraweekview since there is no timeslot property link in ultradayview
For Each slot As TimeSlot In actDayView.TimeSlots
If slot.StartTime.Hour > 10 AndAlso slot.EndTime.Hour < 13 Then
slot.WorkingHourAppearance.BackColor =Color.Red
End If
Next
Hi Matthew,
Thank you for the patience.
A possible aproach to achieve your goal could be to use the code below:
Private Sub ultraButton1_Click(sender As Object, e As EventArgs)
Me.ultraCalendarInfo1.SelectedDateRanges.Add(DateTime.Today, 7, True)
End Sub
Private Sub ultraButton2_Click(sender As Object, e As EventArgs)
For Each slot As TimeSlot In ultraDayView1.TimeSlots
slot.WorkingHourAppearance.BackColor = Color.Red
ultraDayView1.Refresh()
If you still have any other questions do not hesitate to contact us.
what code did you use to change the color on the week view for all those days?
Hello Matthew,
This is working on my machine, as you could see in the attached screenshot.
I am not sure that we are on the same page. Could you please send me a small sample that reproduces your issue, so i can see it and make it work as you expect.
So for just a bit more detail I want to be able to change the color of certain time slots so that I can mark that as Sales Time, or Accounting time, so I can basically section off pieces of my day for certain types of work and I thought color coding would work well, that way I can still schedule appointments in those areas but it allows me to visually see what type of work I should be doing. The first screen shot below shows what I have gotten to work so far, on the day view I was able to change a certain time periond to have a different color of time slots as show below, however when I switch to my week view as you can see the change does not translate over, and when I try to modify the timeslots of the week view I have no clue how to do that, the code above only seems to work for the dayview.
Thank you for posting in Infragistics forum.
Could you please provide us with more details and mockup screenshot, which is showing what are you trying to achieve.
Please do not hesitate to contact us if you have any other question with this matter.