Ticket Q19243
Visible to All Users

Copy Events between Storages - Keep the same IDs

created 17 years ago

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

Answers approved by DevExpress Support

created 17 years ago

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

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.