Freeze Panes of second worksheet

5 posts, 1 answers
  1. Bruno
    Bruno avatar
    2 posts
    Member since:
    May 2016

    Posted 01 Jun Link to this post

    Hello,

    I am using an radSpreadsheet with multiple worksheets. I have no problem when it comes to freezing rows and columns using FreezePanes on the first worksheet. However, I am unable to freeze cells for the second worksheet.

    Is it possible to freeze cells simultaniously on multiple worksheets of a given radSpreadsheet and, if so, could you give me an example of how this could be achieved?

    Thank you.

     

  2. Answer
    Nikolay Demirev
    Admin
    Nikolay Demirev avatar
    103 posts

    Posted 02 Jun Link to this post

    Hello Bruno,

    One way to achieve this is to freeze the active worksheet, the way you are doing it right now, using the RadWorksheetEditor.FreezePanes() method, then to iterate through all worksheets in the workbook and modify their ViewState using the following code:
    foreach (Worksheet worksheet in workbook.Worksheets.Where(p => p != workbook.ActiveWorksheet))
    {
        worksheet.ViewState.FreezePanes(5, 5);
    }

    Currently, there is an issue related to notifying the UI of changes in the ViewState of the worksheet, that is why the active worksheet has to be frozen using a different approach.

    Another workaround is to get the Workbook of the RadSpreadsheet, and replace it with new Workbook, then freeze all worksheets of the original workbook, and return it to the RadSpreadsheet.

    Another workaround is to freeze all worksheets, and just change the active worksheet to another one, and then to the one, which was active before.

    I have logged a public item in our Feedback portal, you can upvote and follow it, this way you would be able to track the process on the matter.

    Regards,
    Nikolay Demirev
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Bruno
    Bruno avatar
    2 posts
    Member since:
    May 2016

    Posted 02 Jun in reply to Nikolay Demirev Link to this post

    Hello Nikolay,

    I tried using the bit of code you linked and it works.

    Thank you very much for your help.

  5. keng sheng
    keng sheng avatar
    1 posts
    Member since:
    Oct 2016

    Posted 25 Oct in reply to Bruno Link to this post

    Hi,

    May i know what library or reference do i need to add in order to user RadWorkshhetEditor? 

    Could you send me the dll please?

    Thank You

  6. Tanya
    Admin
    Tanya avatar
    405 posts

    Posted 28 Oct Link to this post

    Hello Keng Sheng,

    The RadWorksheetEditor class is part of our RadSpreadProcessing library. This library is included in Telerik Document Processing and distributed as a part of several suites. More information on the matter is available here.

    RadSpreadProcessing is used by RadSpreadsheet as its model. This component and the assemblies you should refer from your project to use it are described in our documentation.

    All the assemblies you are eligible to download according to your license, are available in your account. To access them, you should log in at telerik.com, go to the Downloads section and choose a suite.

    Hope this helps.

    Regards,
    Tanya
    Telerik by Progress
    Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
Back to Top
UI for WPF is Visual Studio 2017 Ready