Spread for ASP.NET 10 Product Documentation > Developer's Guide > Customizing the Appearance > Customizing the Appearance of Headers > Showing or Hiding Headers |
By default, the row headers and column headers are displayed in the component. You can hide the row headers, the column headers, or both. The following figure shows a sheet that displays only column headers and hides the row headers.
If the sheet has multiple headers, using the property window instructions to hide the headers, hides all header rows or header columns or both. If you want to hide specific rows or columns within a header, you must specify the row or column. For more details on hiding specific rows or columns, refer to Showing or Hiding Rows or Columns.
The display of headers is done by simply setting the row header Visible property or column header Visible property.
Alternatively, if you prefer you can customize the headers by providing custom text or headers with multiple columns or rows, as explained in Customizing Header Label Text and Creating a Header with Multiple Rows or Columns.
Set the ColumnHeader Visible (or SheetView ColumnHeaderVisible) property or RowHeader Visible (or SheetView RowHeaderVisible) property for a sheet.
This example turns off the display of the row header.
C# |
Copy Code
|
---|---|
// Turn off the display of row headers. FpSpread1.Sheets[0].RowHeader.Visible = false; FpSpread1.Sheets[0].ColumnCount = 4; |
VB |
Copy Code
|
---|---|
' Turn off the display of row headers. FpSpread1.Sheets(0).RowHeader.Visible = False FpSpread1.Sheets[0].ColumnCount = 4 |
This example code sets the first sheet to not display column headers.
C# |
Copy Code
|
---|---|
// Create a new sheet. FarPoint.Web.Spread.SheetView newsheet = new FarPoint.Web.Spread.SheetView(); newsheet.ColumnHeaderVisible = false; // Set first sheet equal to SheetView object. FpSpread1.Sheets[0] = newsheet; |
VB |
Copy Code
|
---|---|
' Create a new sheet. Dim newsheet As New FarPoint.Web.Spread.SheetView() newsheet.ColumnHeaderVisible = False ' Set first sheet equal to SheetView object. FpSpread1.Sheets(0) = newsheet |