Back to Devexpress

Row.Visible Property

officefileapi-devexpress-dot-spreadsheet-dot-row-875c1c09.md

latest7.4 KB
Original Source

Row.Visible Property

Gets or sets whether the row is visible or hidden.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
bool Visible { get; set; }
vb
Property Visible As Boolean

Property Value

TypeDescription
Boolean

true if the row is visible; otherwise false

|

Example

This example demonstrates how to control the visibility of rows and columns in a worksheet using the Row.Visible and Column.Visible properties.

Note

You can also hide a row or column in a worksheet by setting the row height (Row.Height) or column width (Column.Width, Column.WidthInCharacters or Column.WidthInPixels) to 0, respectively (see the How to: Specify Row Height or Column Width document).

View Example

csharp
Worksheet worksheet = workbook.Worksheets[0];

// Hide the 8th row of the worksheet.
worksheet.Rows[7].Visible = false;

// Hide the 4th column of the worksheet.
worksheet.Columns[3].Visible = false;
vb
Dim worksheet As Worksheet = workbook.Worksheets(0)

' Hide the 8th row of the worksheet.
worksheet.Rows(7).Visible = False

' Hide the 4th column of the worksheet.
worksheet.Columns(3).Visible = False

The following code snippets (auto-collected from DevExpress Examples) contain references to the Visible property.

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#L136

csharp
// Display the data entry form on the worksheet to add a new record to the "Suppliers" data table.
if (!sheet.Rows[4].Visible)
    sheet.Rows.Unhide(2, 9);

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

csharp
// Display the data entry form on the worksheet to add a new record to the "Suppliers" data table.
if (!sheet.Rows[4].Visible)
    sheet.Rows.Unhide(2, 9);

winforms-spreadsheetcontrol-api-part1/CS/SpreadsheetControl/SpreadsheetActions/RowAndColumnActions.cs#L137

csharp
// Hide the 8th row of the worksheet.
worksheet.Rows[7].Visible = false;

wpf-spreadsheetcontrol-api-part-1/CS/SpreadsheetControl_WPF_API/SpreadsheetActions/RowAndColumnActions.cs#L137

csharp
// Hide the 8th row of the worksheet.
worksheet.Rows[7].Visible = false;

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

csharp
// Hide the eighth row.
worksheet.Rows[7].Visible = false;
// Hide the fourth column.

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

vb
' Display the data entry form on the worksheet to add a new record to the "Suppliers" data table.
If Not sheet.Rows(4).Visible Then sheet.Rows.Unhide(2, 9)
Me.spreadsheetControl.SelectedCell = sheet("C4")

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

vb
' Display the data entry form on the worksheet to add a new record to the "Suppliers" data table.
If Not sheet.Rows(4).Visible Then sheet.Rows.Unhide(2, 9)
spreadsheetControl1.SelectedCell = sheet("C4")

winforms-spreadsheetcontrol-api-part1/VB/SpreadsheetControl/SpreadsheetActions/RowAndColumnActions.vb#L138

vb
' Hide the 8th row of the worksheet.
worksheet.Rows(7).Visible = False

wpf-spreadsheetcontrol-api-part-1/VB/SpreadsheetControl_WPF_API/SpreadsheetActions/RowAndColumnActions.vb#L137

vb
' Hide the 8th row of the worksheet.
worksheet.Rows(7).Visible = False

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

vb
' Hide the eighth row.
worksheet.Rows(7).Visible = False
' Hide the fourth column.

See Also

Row Interface

Row Members

DevExpress.Spreadsheet Namespace