WorksheetDisplayArea.SetSize(Int32, Int32, Int32) Method
Specifies the number of columns and rows available for display and editing.
Namespace: DevExpress.Xpf.Spreadsheet
Assembly: DevExpress.Xpf.Spreadsheet.v24.2.dll
NuGet Package: DevExpress.Wpf.Spreadsheet
#Declaration
#Parameters
Name | Type | Description |
---|---|---|
worksheet |
Int32 | An integer that is the zero-based index 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.