Hi,
How can i select a TimeSlot in UltraDayView at runTime ?
ex:
Dim uieleMouseOver As Infragistics.Win.UIElement = umvSender.UIElement.ElementFromPoint(umvSender.PointToClient(New Point(e.X, e.Y)))
Dim _Time As TimeSlot = uieleMouseOver.GetContext(GetType(TimeSlot))
_Time.select ?????
Do you want
this.ultraCalendarInfo1.SelectedDateRanges.Add(someDateHere);
Thank for your answer
No, i want to make a drag over on the UltraDawView and select the timeCLot uiElement before DragDrop... (i speak a bad english).
It's a ReadOnly property ....
It is an object property; it exposes a method named SetRange that takes two DateTime structures. You can use this method to programmatically select a TimeSlot or range of TimeSlots.
On a related subject: how do I clear the selected time slots?
When you click on an appointment it selects the appointment AND automatically clears any current time slot selection. I want to do this programmatically, but if you select an appointment from code, it leaves the currently selected time slots in place, and I can't see any way to clear them. :(
This basically amounts to a hack; you can select the AllDayEvent area, which consequently clears the time slot selection:
Infragistics.Win.ISelectionManager selectionManager = this.ultraDayView1 as Infragistics.Win.ISelectionManager;
selectionManager.SelectItem( this.ultraDayView1.VisibleDays[0], false );
Thanks Brian, I tried your suggestion, and although it does remove the selection from the body of the day view, it also makes the "all day" row at the top turn white (because it's selected).
I found another workaround that seems to do the trick, although I'm not sure how reliable it is. If I set the selected range so that the start and end dates are the same then it doesn't show a selection, and for good measure I use the minimum date for the calendar info:
ultraDayView.SelectedTimeSlotRange.SetRange(ultraCalendarInfo.MinDate, ultraCalendarInfo.MinDate) ;
This "looks" like there is no selection, which is all I'm after, but internally it still has a selected range. Ideally there should be a method to clear the selection, similar to the ClearSelectedDateTimeRange() method on the UltraTimelineView, but in the mean time this seems to work.