Is it possible to highlight the time slots (column) that contains the current time. I want to user to be able to see which time column contains the current time. thanks
Bob,
There is no built-in way to do this, but you could achieve it by using a DrawFilter.
Something like this:
class HighlightingDrawFilter : IUIElementDrawFilter
{
public bool DrawElement(Infragistics.Win.DrawPhase drawPhase, ref Infragistics.Win.UIElementDrawParams drawParams)
switch (drawPhase)
case DrawPhase.BeforeDrawBackColor:
drawParams.Graphics.FillRectangle(new SolidBrush(Color.Yellow), drawParams.Element.RectInsideBorders);
return true;
}
return false;
public Infragistics.Win.DrawPhase GetPhasesToFilter(ref Infragistics.Win.UIElementDrawParams drawParams)
if (drawParams.Element is ColumnHeaderUIElement)
DateTimeRange header = (DateTimeRange)drawParams.Element.GetContext(typeof(DateTimeRange));
if (header.StartDateTime < DateTime.Now && header.EndDateTime > DateTime.Now)
return DrawPhase.BeforeDrawBackColor;
return DrawPhase.None;
Let me know if that works for you.
Worked like a charm - thank you very much.