Inserting mutiple rows and merging the cells

2 posts, 0 answers
  1. Nick
    Nick avatar
    3 posts
    Member since:
    Jan 2015

    Posted 29 Aug 2017 Link to this post

    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.


  2. Tanya
    Tanya avatar
    624 posts

    Posted 01 Sep 2017 Link to this post

    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.

    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.
Back to Top