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

Using Freeze Panes

1 Answer 231 Views
SpreadProcessing
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 25 Sep 2015, 04:41 PM

Hello,

In the document found on Telerik (http://docs.telerik.com/devtools/aspnet-ajax/controls/spreadprocessing/features/freeze-panes), 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,

Chris

 

1 Answer, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 29 Sep 2015, 11:58 AM
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.

Regards,
Tanya
Telerik
Tags
SpreadProcessing
Asked by
Chris
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Share this question
or