I am wondering, ig there is way to hide staurday and sunday even in a TimelineView.
I had already played around with
CalendarInfo.DaysOfWeek.Item(UltraWinSchedule.DayOfWeekEnum.Saturday).Visible = false
and
CalendarInfo.DaysOfWeek.Item(UltraWinSchedule.DayOfWeekEnum.Saturday).Enabled = false
but the only goal i reached was to disable the days, but there are still visible.
Any ideas?
Hi,
After looking a your CreationFilter solution, I am able to reproduce the behavior you get when trying to remove a day in the TimeLineView. The requested feature to hide weekends to display days of the week in a TimeLineView has been considered a new produce idea. I have sent your product idea directly to our product management team. Our product team chooses new product ideas for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your feature is chosen for development, you will be notified at that time. Your reference number for this product idea is PI12110117.
If anyone else would like to create a new produce idea for this feature, please submit one in our Feature Request page using the following link:https://es.infragistics.com/my-account/feature-request/
Thank you for your request.
Thanx for the code.
I tried it and I also get emtpy columns. I tried to set the Rect of the objTimeSlotUIElement to 0,0 instead of remove it, but this also leaves emtpy rows in the timeline.
btw: There is a minor bug in your code. As you remove an objTimeSlotUIElement, your for-each loop skips the following objTimeSlotUIElement. So it removes for example saturday, but not sunday.
It would be great if Infragistics gives us the posibility to hide single days in the TimeLineView.
Sure, here it is:
Private Class clsTimelineCreationFilter
Implements IUIElementCreationFilter
Private MyInfo As UltraCalendarInfo
Public Sub New(ByVal info As UltraCalendarInfo)
Me.MyInfo = info
End Sub
Public Sub AfterCreateChildElements(ByVal parent As Infragistics.Win.UIElement) Implements Infragistics.Win.IUIElementCreationFilter.AfterCreateChildElements
'the purpose of this creation filter is to prevent non-working days from displaying in the Timeline...
For Each elem As UIElement In parent.ChildElements
If TypeOf elem Is TimeSlotUIElement Then
Dim objTimeSlotUIElement As TimeSlotUIElement = DirectCast(elem, TimeSlotUIElement)
If objTimeSlotUIElement.IsInWorkingHours = True Then
'working hours are always visible...
Else
'remove slots in non-working hours...
objTimeSlotUIElement.Parent.ChildElements.Remove(objTimeSlotUIElement)
End If
ElseIf TypeOf elem Is ColumnHeaderUIElement Then
Dim objColumnHeaderUIElement As ColumnHeaderUIElement = DirectCast(elem, ColumnHeaderUIElement)
If objColumnHeaderUIElement.DateTimeInterval.IsPrimaryInterval = True Then
If Not IsNothing(objColumnHeaderUIElement.DateTimeRange.StartDateTime) Then
Dim DayOfWeek As DayOfWeekEnum = CType(objColumnHeaderUIElement.DateTimeRange.StartDateTime.DayOfWeek, DayOfWeekEnum)
If MyInfo.DaysOfWeek(DayOfWeek).IsWorkDay = True Then
objColumnHeaderUIElement.Parent.ChildElements.Remove(objColumnHeaderUIElement)
Next
Public Function BeforeCreateChildElements(ByVal parent As Infragistics.Win.UIElement) As Boolean Implements Infragistics.Win.IUIElementCreationFilter.BeforeCreateChildElements
Return False
End Function
End Class
Can you please post your creation filter class source code? I'd like to give it a try.
thx
was able to build a creation filter class and intercept both the ColumnHeaderUI element and the TimeSlotUIElement and remove them. However, doing so just leaves empty space in the timeline. The other days don't slide over into the open space. For example, if I hide Saturday and Sunday, Monday remains in the same position on the control. It doesn't slide over next to Friday. Can you help me with this?
Rich