Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4133
Selected Cell In TimeLine
posted

I am writing a draw filter to hatch the background of non-working days in a TimeLine control and am currently using the BeforeDrawBackColor draw phase to do so.  However, this overrides painting the back color on a selected cell.  I would like to add some code to my GetPhasesToFilter function to exclude the hatching if the cell is the selected cell, but can't seem to find a good way to do so.  Is there a quick way to determine if a cell is the selected cell?  I also need to do this for the DayView, WeekView and MonthViewSingle controls.

Parents
  • 23930
    Verified Answer
    Offline posted

    Hi,

    Thank you for contacting Infragistics Developer Support.

    1) For the TimeLine view, you can check if the element in the GetPhasesToFilter is TimeSlotUIElement. Then check if the DateTimeRange of this UIElement is part of the SelectedDateTimeRange property of the control.

    2) For the DayView, again you should use the TimeSlotUIElement. You can use the GetContext method to get the TimeSlot itself and check if the slot is part of the SelectedTimeSlotRange of the control.

    3) For the WeekView, you can see if the DayUIElement is the ActiveDay in the CalendarInfo of the control.

    4) For the MonthViewSingle is basically the same as the WeekView.

    I have attached a sample containing draw filters for the four controls, notice that all of the Days/TimeSlots are in red except the selected ones.

    Please let me know if you have any additional questions.

    WS_SeletedTimeSlot.zip
Reply Children
No Data