I am trying to make a MSHFlex grid have a header which is bold.
I can't seem to get it right. Here is what I have so far:
Sub gridSet(aGrid As MSHFlexGrid, arecordset As ADODB.Recordset, aprgmname As String)
Set aGrid.DataSource = Nothing
Set aGrid.DataSource = arecordset
With aGrid
'Show the grid
.Visible = True
'Stop redrawing of the grid until we make all the changes. (This reduces flicker)
.Redraw = False
'When the user clicks on a header the entire row is selected.
.AllowBigSelection = True
'Changes made to any cel's properties affect all cels in the grid
.FillStyle = flexFillRepeat
'Move to the header which is row 0
.Row = 0
.Col = 0
'Set row 0 to be a fixed row
.RowSel = .FixedRows
' Set column 0 to be a fixed column
' .ColSel = .Cols
' Make the Header Row (0) bold
.CellFontBold = True
'Make the first row and column fixed
.FixedRows = 1
'Move to the first row and column
.Row = 1
.Col = 1
'When the user clicks on a header only the current record is selected
.AllowBigSelection = False
'A property change of one cell changes the properties of all cells
.FillStyle = flexFillSingle
'Set the backround color of the current cel
.CellBackColor = &HC0FFFF
'Now that the changes are made, redraw the grid
.Redraw = True
'Make the grid the current focus
.SetFocus
End With
Exit Sub
End Sub
Any help would be really appreciated.
Thanks,
Dan
I can't seem to get it right. Here is what I have so far:
Sub gridSet(aGrid As MSHFlexGrid, arecordset As ADODB.Recordset, aprgmname As String)
Set aGrid.DataSource = Nothing
Set aGrid.DataSource = arecordset
With aGrid
'Show the grid
.Visible = True
'Stop redrawing of the grid until we make all the changes. (This reduces flicker)
.Redraw = False
'When the user clicks on a header the entire row is selected.
.AllowBigSelection = True
'Changes made to any cel's properties affect all cels in the grid
.FillStyle = flexFillRepeat
'Move to the header which is row 0
.Row = 0
.Col = 0
'Set row 0 to be a fixed row
.RowSel = .FixedRows
' Set column 0 to be a fixed column
' .ColSel = .Cols
' Make the Header Row (0) bold
.CellFontBold = True
'Make the first row and column fixed
.FixedRows = 1
'Move to the first row and column
.Row = 1
.Col = 1
'When the user clicks on a header only the current record is selected
.AllowBigSelection = False
'A property change of one cell changes the properties of all cells
.FillStyle = flexFillSingle
'Set the backround color of the current cel
.CellBackColor = &HC0FFFF
'Now that the changes are made, redraw the grid
.Redraw = True
'Make the grid the current focus
.SetFocus
End With
Exit Sub
End Sub
Any help would be really appreciated.
Thanks,
Dan