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 eventDim lobjAppointment As Infragistics.Win.UltraWinSchedule.AppointmentlobjAppointment = 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 Ifand 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?RegardsChris
chrisclarke007 said:This does stop multi select however it now also stops the editting of the appointments.
Hi,Here is a basic example. See attached. RegardsChris
Use the ISelectionManager.SetPivotItem method to activate the appointment:
Private Sub UltraMonthViewSingle1_MouseClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles UltraMonthViewSingle1.MouseClick Dim lobjAppointment As Infragistics.Win.UltraWinSchedule.Appointment lobjAppointment = UltraMonthViewSingle1.GetAppointmentFromPoint(e.Location) If lobjAppointment Is Nothing Then ' No appointment, so create one which pops up the combo nicely. UltraMonthViewSingle1.PerformAction(Infragistics.Win.UltraWinSchedule.MonthViewSingle.UltraMonthViewSingleAction.AddNewAppointment, False, False) Else ' See if i can force the appointment into edit mode to show combo Dim i As ISelectionManager = sender i.SetPivotItem(lobjAppointment, False) UltraMonthViewSingle1.PerformAction(Infragistics.Win.UltraWinSchedule.MonthViewSingle.UltraMonthViewSingleAction.EnterEditMode, False, False) End If End Sub
Hi,Ok thanks for the help.. Sometimes i'm getting the error:"Can't access SelectionStart unless the Editor is in edit mode."on the line:calMain.PerformAction(Infragistics.Win.UltraWinSchedule.MonthViewSingle.UltraMonthViewSingleAction.EnterEditMode, False, False)
One thing i'm doing is on the BeforeEditAppointment event i'm checking the day of the week and if its a weekend i'm setting the AppointmentEditorControl to be a different combo box. Do you think this will be affecting it?RegardsChris
hi,ok i'm nearly there.. I've still got the issue with swapping the combo editor control depending on the day of week, however if i just use one combo now i've got anothing problem. I changed it to a dropdownlist however now the text doesn't get put into the appointment.How would you recommend i handle getting the object value from the combo boxes selected item? So i can put some text into the appointment and also store the object returned from the combo against the appointment.Should i use the combo's selected item event and check what appointment is in edit mode and set it that way? Or is there some event from the monthview control i should be intercepting.RegardsChris
hi,wow for such a simple use of a calendar control you don't half have to jump through hoops and tell the control to do some strange things to get something that vaguely works..Out standing issues:1. I need to change the appointment editor combo box depending on the day of week selected. Doing this on the before appointment edit event sends it crazy. any other ways of doing it?2. Combo boxes as appointment editors really don't work very well. It gets very confused between datavalue and display text on the combo items valuelist object. I can code around it, but its odd.. For example when you select an item from the combo it puts the display text into the subject, however that doesn't display on the screen, you have to take the display text and look up the coresponding ID (which is stored in the datavalue property of the valuelistitem and set the subject to be the ID, then the display text shows on the screen in the appointment!?3. When the combo drops down and you select an item this does not fire the after edit appointment event till after you have moved off the day. Even if you loose focus to another form it doesn't trigger. As my objects are created in the after edit appointment event (as this seems to be the only place it can be done) if somebody drops down the combo, selects an item and clicks the Save button on my form the new selection wont be saved. As i can't use the combos own events (they dont fire) i need a way that when the item is selected it sets the appointments value and fires the after appointment edit event straight away.Any clues? I was expecting this to be an easy task with a decent control set like infragistics :-(RegardsChris
Hello
After some research, this issue has been determined to be a new feature request. I have sent your feature request directly to our product management team. Our product team chooses new feature requests for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. Your reference number for this feature request is FR13012.
If you would like to follow up on your feature request at a later point, you may contact Developer Support management via email. Please include the reference number of your feature request in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com
Thank you for your request.
Hello,
I am just checking about the progress of this issue. Did you need any further assistance on this issue?
Let me know if you need any further assistance.
Currently you could set one editor for all appointments, and if you change the settings of the editor, this change will reflect on all appointments. I mean if you want to set ultraCombo to use DropDownList for appointments from Monday to Friday it will work correctly, but if you set ultraCombo to use DropDown for appointment for Saturday and Sunday, this will allow you to write a text in the ultraCombo and when you get back using DropDownList, the written text for the appointment for Saturday and Sunday will disappear, because the editor would not be able to find a match in the list. In other words if you have a written text in the combo and you change its DropDownStyle the written text will appear or disappear depends on the chosen style. That’s why I have logged a feature request for this to be able to use different editors for each appointment.
Let me know if you have any further questions.
Hi,So what your saying is that although combo boxes can be setup to be used for appointment editors they don't actualy work, and thats a new feature request? Seems odd to me!Ok, what about using a creation filter to overlay a combo box when the appointment is being editted so i can actualy respond to the combo events? Or something along those lines?RegardsChris