Copy and Paste operations with Gantt Chart Light Library components

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).

About DlhSoft Team

DlhSoft is a software development company focused on building high quality and innovative solutions using state-of-the-art technologies for customers worldwide. Our activity includes designing and developing general purpose software applications, components and tools, and customized software solutions upon request. DlhSoft team is highly experienced and fully dedicated to software development. Additionally, one of the most important things we rely on is the continuous communication with the customer.
This entry was posted in Development Components and tagged , , , , , . Bookmark the permalink.

Add a reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s