The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
Hi,
I am trying to copy a set of rows, specified by a start position and number of rows, from one grid control to a second grid control. How can I copy these rows and maintain the style info (column width, row heighth, row data, etc) from one grid to another?
Thanks,
Gordon
ADAdministrator Syncfusion Team November 2, 2004 05:04 PM UTC
If these are non-virtual GridControls, the default copy support should copy all style information for you. But it will not copy things like row height/column widths since this is not part of the GridStyleInfo object.
So, to do this special copy/paste, you can handle the grid.ClipboardCopy event. In the handler, create a custom DataObject holding the information you want to persist, and put this object on the clipboard (setting e.Handled if you do not want the grid to continue its default copy support). Then to do the Paste, you would handle the grid.ClipboardPaste event. In your handler, you would retrieve your custom data object from the clipboard, and set the values from it on the grid.