Back to Devexpress

ColumnCollection.Hide(Int32, Int32) Method

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

latest3.0 KB
Original Source

ColumnCollection.Hide(Int32, Int32) Method

Hides the specified columns 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 column to be hidden.

| | last | Int32 |

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

|

Remarks

Use the Hide method to hide multiple columns at once. To hide an individual column, use the Column.Visible property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference 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.

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

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

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

vb
' Hide columns from 5 to 7.
worksheet.Columns.Hide(5, 7)
' Hide rows from 6 to 8.

See Also

Unhide(Int32, Int32)

ColumnCollection Interface

ColumnCollection Members

DevExpress.Spreadsheet Namespace