WorksheetDisplayArea.SetSize(String, Int32, Int32) Method
Defines the number of visible columns and rows for the specified worksheet.
Namespace: DevExpress.Xpf.Spreadsheet
Assembly: DevExpress.Xpf.Spreadsheet.v24.2.dll
NuGet Package: DevExpress.Wpf.Spreadsheet
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
worksheet |
String | A string specifying the name of the worksheet whose visible area should be restricted. |
max |
Int32 | An integer that is the maximum number of columns to be displayed in a worksheet. The value must be a whole number between 1 and 16,384. |
max |
Int32 | An integer that is the maximum number of rows to be displayed in a worksheet. The value must be a whole number between 1 and 1,048,576. |
#Remarks
This example demonstrates how to display only 5 rows and 5 columns in a worksheet.
The SetSize method restricts access to worksheet cells only in UI and does not affect API methods, so you can change the content and formatting of necessary cells in code.
To restore the restricted visible area to the default size with all rows and columns visible, use the Reset method.