Hi,
I've been tasked with writing a prototype application that uses the above Infragistics component. One of the requirements is that the user can flip between the day view and a week view which I do very simply like this;
IF ultraButton:TEXT = "One day" THEN
DO:
ultraButton:TEXT = "7 day".
ultraCalendarInfoSelectedPacker:SelectedDateRanges:Clear().
END.
ELSE
DO:
ultraButton:TEXT = "One day".
ultraCalendarInfoSelectedPacker:SelectedDateRanges:Clear().
ultraCalendarInfoSelectedPacker:SelectedDateRanges:Add(DATETIME(TODAY, MTIME), 7).
END.
One of the requirements is that the user can in the single day view, advance the selected day forwards and drag an item from an ultragrid and drop it onto the calendar to create an appointment which works fine.
The problem comes when the 7 day view is selected. When I drag a row from the grid the appointment is always created on the first day (today) and not in the day I have selected. I somehow need a way of setting the active day to be the day that the user clicked on but can't see how to achieve this.
In the image the active day is the 20th, but I've clicked on the 22nd. I somehow need to get the selected item in the calendar and make the 22nd the active day.
Many Thanks,
Mark.
For the dayview, I use the below
screenPoint = new System.Drawing.Point(e:X, e:Y).
localPoint = ultraDayView:PointToClient(screenPoint).
ultraDayView:DateTimeFromPoint(localPoint).
ultraDayView:GetOwnerFromPoint(localPoint).
For the weekview , take a look at the following link www.infragistics.com/.../infragistics.win.ultrawinschedule~infragistics.win.ultrawinschedule.ultraweekview~getdayfrompoint(point)
Good luck !
Hi Mark,
If the active day is related to the scoop of days visual in the display and displays 7 days.
When creating a new item you could not use the active day variable. Could you collect the date from the view you click or drop it on. Request the clicked date value. You do not have to make it the active day but assign the clicked day value to it.
Regards,
Peter.
Hi Peter,
Thanks for the advice...I'll give it a try :-)
For the dayview, I use the below
screenPoint = new System.Drawing.Point(e:X, e:Y).
localPoint = ultraDayView:PointToClient(screenPoint).
ultraDayView:DateTimeFromPoint(localPoint).
ultraDayView:GetOwnerFromPoint(localPoint).
For the weekview , take a look at the following link www.infragistics.com/.../infragistics.win.ultrawinschedule~infragistics.win.ultrawinschedule.ultraweekview~getdayfrompoint(point)
Good luck !