In the application I am working on all data is time related, and it is really functional to provide an overview of the status of a customer by displaying those 'events' in a calendar view.
However, the Infragistics calendar controls only offer the possibility to show 'Appointments' as text (there is also the possibility of a 'Note' but I cannot find any information about that in the help).
Of course the events are not appointments but events. However instead of simple text I would like to display rich text, with images, colors, fonts and tooltips for more information.
Can this not be done with the Infragistics controls? Any suggestions?
I have no idea if this works but maybe you can set the AppointmentEditorControl to a ultraFormattedTextEditor of UltraFormattedLinkLabel? Don't know if the WinSchedule controls will pick up the rich text...
I have no idea if this works but maybe you can set
the AppointmentEditorControl to a
ultraFormattedTextEditor of UltraFormattedLinkLabel?
Don't know if the WinSchedule controls will pick up
the rich text...
The above should work fine (and reading the doc I've learnt that the difference between the AppointmentEditor and AppointmentEditorControl is that the former can only be set at runtime). Infragistics has a (C#) sample which uses a combo as the editor control.
Note that you can also provide your own dialogue for editing the appointment, if you choose (override the UltraCalendarInfo BeforeDisplayAppointmentDialog event).
-- peter
I should have explained myself better.
I know you can customize of override the control that opens when you click on the appointment, but I want to change the display of the appointment in the calendar. For example, an icon and a text.
I should have explained myself better.
I know you can customize of override the control that
opens when you click on the appointment, but I want
to change the display of the appointment in the
calendar. For example, an icon and a text.
The AppointmentEditor/Control will allow you to do this. You'd have to create the editor control (or use a formatted editor as Simon suggests).
Attached is a screen shot of the example I referred to earlier.
Is that closer to what you were thinking?
-- peter
OK that looks as if it should be possible. I will dive into it.
Thanks!
Unfortunately this did not work for me. FormattedTextEditors are not supported here.
Any other suggestions?
(there is also the possibility of a 'Note' but I
cannot find any information about that in the help).
C# sample attached. Based on your findings I don't think this will support rich text either but maybe you can use it to find another solution or mix it with the appoinments...
[View:~/cfs-file.ashx/__key/communityserver-discussions-components-files/19/frmMain_2E00_cs:550:0]
Thanks! I finally managed. How can you figure out this stuff without Visual Studio? AFAICS the information is not in the docs.
BTW It turns out that the NoteEditorControl and AppointmentEditorControl do support FormattedLinkLabel but NoteEditor and AppointmentEditor do not. That cost me some time.
"Note that you can also provide your own dialogue for editing the appointment, if you choose (override the UltraCalendarInfo BeforeDisplayAppointmentDialog event)."
Could you explan how to do so please? I would like to prevent the default appointment dialog from appearing, and use my own instead.
Many thanks,
Roger
rogerholmes wrote:
"Note that you can also provide your own dialogue for editing the appointment, if you choose (override the UltraCalendarInfo BeforeDisplayAppointmentDialog event)."
Could you explan how to do so please? I would like to prevent the default appointment dialog from appearing, and use my own instead.
Many thanks,
Roger
There's an example in the AutoEdge 2.0 sample (http://communities.progress.com/pcom/docs/DOC-57428).
Look in OpenEdge.AutoEdge.DailySchedule at the OnBeforeDisplayAppointmentDialog method, which I've included below.
method private void OnBeforeDisplayAppointmentDialog( input sender as System.Object, input e as Infragistics.Win.UltraWinSchedule.DisplayAppointmentDialogEventArgs ):
define variable testDriveDialog as TestDriveAppointmentDialog no-undo.
/* Stop the default dialog from displaying */
e:Cancel = true.
/* If this is an existing appointment, it will already have values */
if not e:IsExistingAppointment then
e:Appointment:Subject = "New Test Drive".
/* Launch the dialog*/
session:set-wait-state('general':u).
testDriveDialog = new TestDriveAppointmentDialog(this-object,
ultraCalendarInfo1,
ultraCalendarLook1 ).
testDriveDialog:Appointment = e:Appointment.
testDriveDialog:AppointmentTag = cast(e:Appointment:Tag, Hashtable).
testDriveDialog:ExistingAppointment = e:IsExistingAppointment.
testDriveDialog:BindData(fDealerDataset, fCarDataset, fCustomerDataset).
session:set-wait-state('':u).
wait-for testDriveDialog:ShowDialog().
/* Only add to collection if OK. */
if EnumHelper:AreEqual(testDriveDialog:DialogResult, DialogResult:OK) then
do:
/* Don't forget to add the appointment to the */
if not e:IsExistingAppointment then
ultraCalendarInfo1:Appointments:Add(e:Appointment).
end.
testDriveDialog:Dispose().
return.
end method.
Hopefully that's enough to get you started.
-- peter
Peter
Many thanks for your help, I am very grateful.
Kind regards,
Roger