Skip to content

DevExpress-Examples/how-to-initialize-appointment-images-and-display-text-using-the-custom-field-values-t328320

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Files to look at:

How to initialize appointment images and display text using the custom field values

Starting with version 15.2, we split layout calculation operations into several threads to improve the typical performance of a Scheduling application. Correspondingly, in a common scenario, the InitAppointmentImages event (as well as InitAppointmentDisplayText) can be raised from another thread than the one where the SchedulerControl instance was created. Accessing the SchedulerControl (SchedulerStorage) instance directly in the InitAppointmentImages event when the OptionsBehavior.UseAsyncMode property is true can result in "cross-thread" exceptions.

Correspondingly, to avoid the "cross-thread" issues in a scenario when the OptionsBehavior.UseAsyncMode property is true, you need to avoid direct accessing the SchedulerControl or SchedulerStorage instance in the mentioned event handlers.
To implement it, we recommend storing all the required information to calculate custom appointment images and the display text as custom appointment fields, to operate only with the current appointment instance without accessing an underlying source object.
This example demonstrates how it can be achieved.


Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)