Posted 8 September 2017, 1:13 pm EST
Just upgraded an application from .Net Spread for Windows 2.5 to version 4.
I set the header row height using GetPreferredHeight. If the preferred height is 0, the header row is hidden, but the matching row on the grid is also hidden. Below is an example which populates the header text and cells, numbering each from 0 to 4. Header row 3 has no description, and when the height is set to0, row 3 on the grid is hidden as well.
Can anyone assist?
Dim hdrRow As Integer
Dim hdrHeight, rowindx As Integer
.ColumnHeaderRowCount = 5
.ColumnHeader.AutoText = FarPoint.Win.Spread.HeaderAutoText.Blank
For rowindx = 0 To 4
If rowindx <> 3 Then
.ColumnHeader.Cells(rowindx, 0).Text ="Header" + rowindx.ToString
.Cells(rowindx, 0).Text ="Row" + rowindx.ToString
For hdrRow = 0 To 4
hdrHeight = .ColumnHeader.Rows(hdrRow).GetPreferredHeight
.ColumnHeader.Rows(hdrRow).Height = hdrHeight'If 0, seems to hide matching row of the grid as well?