This example illustrates the use of a custom form to enable the end-user to edit custom fields. The custom form is invoked instead of the default one by handling the SchedulerControl.EditAppointmentFormShowing event.
See also:
For a simple application that enables you to handle custom fields, see the E2782: How to create a simple scheduling application that uses custom appointment fields and a custom editing form article.
Example Comments
Added By: Bill Scharf at: 6/12/2013 12:51:13 AM
Great example! The combobox for resources does not seems to list the resources. I have tried to figure out how to remedy this, but my skills are probably lacking. It does seems to stream in the resources from XML. The combobox does seem to be pointed to a resourceComboboxControl. What else am I missing?
Added By: Brian (DevExpress) at: 6/13/2013 3:23:45 AMUse the following line of code:
this.resourcesComboBoxControl1.SchedulerControl = control;
to initialize the combobox for resources in a custom form.
Thank you Brian, but that is not a workable solution. What that does is link the main scheduler control to the Combobox (correct me if I am wrong). So when I have the Scheduler viewing appointments for all resources, and creating a new appointment for resource #2 then when I return to the scheduler's main control the appointments for the other resources are gone.
What I am looking for (and probably just to ignorant to find despite hours of searching) is probably very simple. I want to be able to edit the resources for an appointment (yes, more than 1 resource per appointment is possible and I have resource sharing turned on). something like:
...on initialization
AppointmentResourceEdit1.selectedResourceIDs = apt.resourceIDs
....and when clicking "ok" something like:
controller.ResourceIDS = AppointemntResourceEdit1.selectedResourceIds
What am I doing wrong or missing?
Added By: Brian (DevExpress) at: 6/14/2013 5:01:33 AMYou have to make changes via controller, not to modify appointment directly. To edit resources, obtain resource collection via controller.ResourceIds, clear it and add resources from the AppointmentResourceEdit.ResourceIds.
Please open a support ticket and send a sample project to our Support Team, and they will certainly help you.