Posted 26 May 2022, 8:00 pm EST
Is there a way to copy a C1FlexGrid to another C1FlexGrid. I need all styles and data to be copied. Looking for a simple way to do this without looping through the styles, rows and columns.
Thanks!
Forums Home / ComponentOne / WinForms Edition
Posted by: mhamilton on 26 May 2022, 8:00 pm EST
Posted 26 May 2022, 8:00 pm EST
Is there a way to copy a C1FlexGrid to another C1FlexGrid. I need all styles and data to be copied. Looking for a simple way to do this without looping through the styles, rows and columns.
Thanks!
Posted 27 May 2022, 7:03 am EST
Hi,
Unfortunately, there is no direct way of copying a C1FlexGrid into another. You will need to write a method according to your own requirements.
Although, you can use some Grid methods such as WriteXml to copy the Data directly into another Grid using a temporary XML file and then copying the Styles manually. You can also use the SaveExcel method to export a temporary Excel file in a memory stream which will copy the styles also and then load it into another Grid. Kindly refer to the attached sample showing the above approaches.
Best Regards,
Kartik
Posted 27 May 2022, 9:59 am EST
Thank you! I appreciate all the help and support!