Dear Serge,
I've got some small, but principle question regarding cxScheduler. If I copy cxSchedulerEvent from one cxSchedulerStorage to another, the IDs of the objects are different!
Short description: I would like to copy some cxSchedulerEvent object with the exact ID.
Problem: when copying the cxSchedulerEvent object the new copy obtains the different ID. Then I am unable to match the source and new objects, while their IDs are different.
The other properties are not unique event in their combination.
Please, advice!
Best regards,
Paul
Copy Events between Storages - Keep the same IDs
Answers approved by DevExpress Support
Hi Paul,
It's impossible to implement this functionality by default, sorry. By design, an unbound TcxSchedulerStorage doesn't allow you to set the ID values of its Events. Its DataController initializes them automatically. You may define a CustomField in your destination unbound Storage, and use it to store the source IDs. This approach will allow you to identify Events by their source ID values.
A more complex technique is to implement a TcxSchedulerStorage descendant, override its GetRecordID method, and provide custom ID values, which are stored in a CustomField. However, this approach requires you to verify the validity of these custom values.
Thanks,
Serge