Skip to content

Latest commit

History

History
27 lines (19 loc) 路 3 KB

File metadata and controls

27 lines (19 loc) 路 3 KB

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)