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
395
UltraCalendarInfo stopped appointment editting
posted

Hi,
I want to use the UltraMonthViewSingle control in a very simple way.  All i need to do is have a combo box on each day so the user can select a value for each day.  I've set the AppointmentEditorComponent to be a combo box and fiddled with the various settings and written a bit of code and it works fine.  However i don't want multi-select, so i looked around and found out to change the select type to single you have to set the CalendarInfo.SelectTypeActivity enum to single.  This does stop multi select however it now also stops the editting of the appointments.

Whenever i assign a ultracalendarinfo component to the month view single control it does this. 

In order to get the control to act how i wanted i've added some code into the Mouseclick event

Dim lobjAppointment As Infragistics.Win.UltraWinSchedule.Appointment
lobjAppointment = UltraMonthViewSingle1.GetAppointmentFromPoint(e.Location)
If lobjAppointment Is Nothing Then
    UltraMonthViewSingle1.PerformAction(Infragistics.Win.UltraWinSchedule.MonthViewSingle.UltraMonthViewSingleAction.AddNewAppointment, False, False)
Else
    UltraMonthViewSingle1.PerformAction(Infragistics.Win.UltraWinSchedule.MonthViewSingle.UltraMonthViewSingleAction.EnterEditMode, False, False)
End If

and also code in the AfterAppointmentEdit event to remove any blank appointments (if somebody doesn't select something from the combo):

If
e.Appointment.Text = "" Then
    UltraMonthViewSingle1.CalendarInfo.Appointments.Remove(e.Appointment)
End if

This works ok until i try and stop multi select.  Then when i click on the day it allows me to select an item from the combo, but when i go back to the day to select a different item the combo never appears and i can't edit. 

Any ideas?

Regards
Chris

Parents Reply Children
No Data