This is a migrated thread and some comments may be shown as answers.

Inserting mutiple rows and merging the cells

1 Answer 237 Views
Spreadsheet
This is a migrated thread and some comments may be shown as answers.
Nick
Top achievements
Rank 1
Nick asked on 29 Aug 2017, 06:20 PM

I am attempting to insert rows between existing rows within a worksheet. Each newly inserted row should have the cells within merged and have a text value.

I am basically calling the following in a loop on a very small spreadsheet (only 12 rows and 4 columns) and it is very slow. The spreadsheet originates from a call to grid.ExportToWorkbook().

 

 

worksheet.Rows.Insert(rowIndex, 1);

worksheet.Cells[rowIndex, 0].SetValueAsText("haha");

worksheet.Cells[new CellIndex(rowIndex, 0), new CellIndex(rowIndex, 3)].Merge();

 

Two issues:

Issue 1: This is very slow. Each call to insert takes a long time to execute. The entire operation takes several seconds despite only inserting 12 rows. I have suspended layout, put everything in a single undo group. The control isn't even visible at this point.

 

Issue 2: The cells do not seem to be merging correctly. Some of the values of non inserted rows are removed. If I comment out the call to merge, all values appear to be correct

 

Thanks in advance.

 

1 Answer, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 01 Sep 2017, 03:36 PM
Hi Nick,

I agree with you that the performance of the insertion of rows should be improved. We have already logged an internal task to improve the performance of the control. I added your request to this task and created a public item. You can vote for this implementation and subscribe to track its status using the item: Improve RadSpreadsheet performance. I am afraid I couldn't find an approach to suggest you for improving the current behavior. 

In regards to the merged cells, I couldn't find an issue with this functionality. Can you please send us more details about the scenario? Can you reproduce the issue with any document? Could it be related to a specific one? If so, can you share a sample document which we can use for testing?

I am looking forward to hearing from you.

Regards,
Tanya
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
Spreadsheet
Asked by
Nick
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Share this question
or