officefileapi-devexpress-dot-spreadsheet-dot-row-875c1c09.md
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
bool Visible { get; set; }
Property Visible As Boolean
| Type | Description |
|---|---|
| Boolean |
true if the row is visible; otherwise false
|
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).
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;
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.
// 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
// 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);
// Hide the 8th row of the worksheet.
worksheet.Rows[7].Visible = false;
// Hide the 8th row of the worksheet.
worksheet.Rows[7].Visible = false;
// Hide the eighth row.
worksheet.Rows[7].Visible = false;
// Hide the fourth column.
' 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
' 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")
' Hide the 8th row of the worksheet.
worksheet.Rows(7).Visible = False
' Hide the 8th row of the worksheet.
worksheet.Rows(7).Visible = False
' Hide the eighth row.
worksheet.Rows(7).Visible = False
' Hide the fourth column.
See Also