I'm trying to use a context menu on an ultraDayView (2004, Vol. 1) and I need to be able to select the timeslot/appointment where I right click. I currently have the event setup to recognize MouseDown on the dayview, but I do not know how to get it to select the timeslot/appointment the mouse is over. Any help will be much appreciated.
Nevermind. I've found a solution to this issue. I simply created a function that simulated a left mouseclick and had that occur in the mousedown event. Now, however, I need to find a way to get the selected timeslot/appointment.
Try to use SelectedDateRanges property and pick the time slot.
Hi,
You can try this in Mouse down event
Appointment
app = this.ultraDayView1.GetAppointmentFromPoint(e.X, e.Y);
if the app obejct is null then there is no appointment time slot in the mouse click area. Else you can do whatever you want.
If you are trying to get the selected time on the dayview, all you need to do is:
DateTime et = dayView.SelectedTimeSlotRange.EndDateTime;
I was trying to use that, but wasn't certain how to get the timeslot based on pointer's location. However, I found some code to simulate a mouse left click, and used that to make the selection. Thanks for your input, though.