Back to Devexpress

RowCollection.Hide(Int32, Int32) Method

officefileapi-devexpress-dot-spreadsheet-dot-rowcollection-dot-hide-x28-system-dot-int32-system-dot-int32-x29.md

latest4.3 KB
Original Source

RowCollection.Hide(Int32, Int32) Method

Hides the specified rows in a worksheet.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
void Hide(
    int first,
    int last
)
vb
Sub Hide(
    first As Integer,
    last As Integer
)

Parameters

NameTypeDescription
firstInt32

A zero-based integer representing the index of the first row to be hidden.

| | last | Int32 |

A zero-based integer representing the index of the last row to be hidden.

|

Remarks

Use the Hide method to hide multiple rows at once. To hide an individual row, use the Row.Visible property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Hide(Int32, Int32) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

wpf-spreadsheet-bind-spreadsheet-to-ms-sql-server-database/CS/WpfSpreadsheet_BindToDataSource/MainWindow.xaml.cs#L89

csharp
range.ClearContents();
    sheet.Rows.Hide(2, 9);
}

winforms-spreadsheet-bind-to-ms-sql-server-database/CS/SuppliersExample/Form1.cs#L74

csharp
range.ClearContents();
    sheet.Rows.Hide(2, 9);
}

spreadsheet-document-api-examples-part1/CS/SpreadsheetExamples/SpreadsheetActions/RowAndColumnActions.cs#L130

csharp
// Hide rows from 6 to 8.
worksheet.Rows.Hide(5, 7);

wpf-spreadsheet-bind-spreadsheet-to-ms-sql-server-database/VB/WpfSpreadsheet_BindToDataSource/MainWindow.xaml.vb#L77

vb
range.ClearContents()
    sheet.Rows.Hide(2, 9)
End Sub

winforms-spreadsheet-bind-to-ms-sql-server-database/VB/SuppliersExample/Form1.vb#L71

vb
range.ClearContents()
    sheet.Rows.Hide(2, 9)
End Sub

spreadsheet-document-api-examples-part1/VB/SpreadsheetExamples/SpreadsheetActions/RowAndColumnActions.vb#L106

vb
' Hide rows from 6 to 8.
worksheet.Rows.Hide(5, 7)
' Hide the tenth row.

See Also

Unhide(Int32, Int32)

RowCollection Interface

RowCollection Members

DevExpress.Spreadsheet Namespace