The saveToXml and loadFromXml methods of the Schedule class let you save and load complete schedules to/from XML documents. The toJson and fromJson methods let you encode or decode a schedule into/from a JSON string, which could be used to store the whole schedule in a database table field or as a part of a larger file.
The following method saves the calendar to XML and posts it to specified server URL:
JavaScript
Copy Code
|
|---|
function toXml() |
Any of the Contact, Item, Location, Recurrence, Resource and Task classes define their own saveToXml, loadFromXml, toJson, fromJson methods, which you can use to serialize their instances.
The "Serialization" tutorial provides you with a steb-by-step guide on how to save and load the schedule to/from a json file.
The component provides built-in support for clipboard operations, allowing users to move or duplicate schedule items by means of copyToClipboard, cutToClipboard, and pasteFromClipboard methods. This system utilizes full XML serialization to preserve the complete state of items, including custom properties, durations, and relative spatial offsets when multiple items are selected.
During the paste process, the control automatically handles resource mapping by matching identifiers, while raising itemPasting and itemPasted events to intercept, validate, or modify each item as it is integrated into the target schedule.