If you use DataGrid based components, such as GanttChartDataGrid or ScheduleChartDataGrid, from the latest build of Gantt Chart Light Library (either targeting Silverlight™ or WPF), you can now easily enable Copy, Cut, Delete, and Paste operations by simply calling the appropriate methods we have recently added to their APIs: Copy, Cut, Delete and Paste (working on the current grid selection).
Moreover, if you enrich the items with custom properties by inheriting from GanttChartItem you can easily enhance Copy and Paste operations by handling a set of specific events (update: some improvements have been applied at the time of releasing build 4.3.9 of the library):
- CopyingHeader event allows you to copy the custom property names to the header row: set e.ExtraTabSeparatedHeaderValues to an array containing your property names;
- CopyingItem event allows you to copy the actual custom property values for each item to its output row (the event will occur once for each item): read e.Item (casting it to your custom class that inherits from GanttChartItem), and set e.ExtraTabSeparatedValues to an array containing the property values;
- PastingItem event allows you to read the pasting values from an input row and create and setup a new item accordingly: read e.ExtraTabSeparatedValues array, and set e.Item to a new instance of your custom object type with the custom properties set up to the received values;
- PastedItem event allows you to updated the newly created item if you have specific requests; read and update e.Item (casting it to your custom class that inherits from GanttChartItem, if needed).
