Using Freeze Panes

2 posts, 0 answers
  1. Chris
    Chris avatar
    2 posts
    Member since:
    Apr 2013

    Posted 25 Sep 2015 Link to this post


    In the document found on Telerik (, it shows the ActiveWorksheet has a ViewState property, however I do not find that.

    I am using the Workbook class found in the namespace Telerik.Windows.Documents.Spreadsheet.Model.  It is my understanding that this is the correct Namespace / DLL(s) to use for processing spreadsheets.



    Your help is appreciated,



  2. Tanya
    Tanya avatar
    583 posts

    Posted 29 Sep 2015 Link to this post

    Hi Chris,

    Indeed, the Workbook and Worksheet classes are located in the Telerik.Windows.Documents.Spreadsheet.Model namespace. The ViewState property of Worksheet is introduced in the Q1 2015 release and if you are using an earlier version of the controls, you could update them in order to take advantage of this feature.

    In order to use the Freeze Panes functionality with previous versions, you could follow the steps below:

    1. Get the view state of the worksheet:
    WorksheetViewStateworksheetViewState = (WorksheetViewState)((ISheet)workbook.ActiveWorksheet).ViewState;

    2. Create a new pane and set it to the pane property of the view state:
    Panepane = new Pane(new CellIndex(17, 4), 3, 5, ViewportPaneType.Scrollable);
    worksheetViewState.Pane = pane;

    Hope this helps.

Back to Top