Skip to main content
A newer version of this page is available. .

WorksheetDisplayArea.SetSize(Int32, Int32, Int32) Method

Defines the number of visible columns and rows for the specified worksheet.

Namespace: DevExpress.Web.ASPxSpreadsheet

Assembly: DevExpress.Web.ASPxSpreadsheet.v18.2.dll

Declaration

public void SetSize(
    int worksheetIndex,
    int maxColumnCount,
    int maxRowCount
)

Parameters

Name Type Description
worksheetIndex Int32

An integer that is the zero-based index of the worksheet whose visible area should be restricted.

maxColumnCount Int32

An integer that represents the maximum number of columns to be displayed in a worksheet.

maxRowCount Int32

An integer that represents the maximum number of rows to be displayed in a worksheet.

Remarks

The following example demonstrates how to display only 6 columns and 20 rows in a worksheet.


ASPxSpreadsheet1.WorksheetDisplayArea.SetSize(0, 6, 20);

The image below shows the result.

Spreadsheet-WorksheetDisplayArea.png

Note that the SetSize method does not affect API methods, so you can change cell content and formatting in code.

To restore the restricted visible area to the default size with all rows and columns visible, use the WorksheetDisplayArea.Reset method.

See Also