hansu
Programmer
- Mar 12, 2002
- 89
I have a MSHFlexgrid (flgRooms) that has the datasource set to a hierarchical recordset (rstRooms). It is used to show data to the user depending on a date he chooses from a datalist. Whenever the Mshflexgrid is filled the first time the first row does not show. It seems that it uses the fixed row. When the programm is run again the flexgrid shows the data correctly.
I use the following code to populate the grid:
Thanks for your assistance.
I use the following code to populate the grid:
Code:
With flgRooms
Set rstRooms.DataSource = rstRooms
If rstRooms.RecordCount > 0 Then
.BandDisplay = flexBandDisplayHorizontal
.FixedRows = 1
.TextMatrix(0, 3) = "Nr."
.TextMatrix(0, 4) = "Bezeichnung"
.TextMatrix(0, 5) = "Plätze"
.TextMatrix(0, 6) = "Belegt"
.TextMatrix(0, 7) = "Frei"
.ColHeaderCaption(1, 2) = "Gruppe"
.ColHeaderCaption(1, 3) = "Plätze von"
.ColHeaderCaption(1, 4) = "bis"
.CollapseAll (0)
.ColWidth(0, 0) = 300
.ColWidth(1, 0) = 0
.ColWidth(2, 0) = 0
.ColWidth(3, 0) = 400
.ColWidth(4, 0) = 1500
.ColWidth(5, 0) = 600
.ColWidth(6, 0) = 600
.ColWidth(7, 0) = 600
.ColWidth(0, 1) = 0
.ColWidth(1, 1) = 0
.ColWidth(1, 2) = 1500
.ColWidth(1, 3) = 600
.ColWidth(1, 4) = 600
.Width = 7200
.ScrollBars = flexScrollBarVertical
.MergeCells = flexMergeFree
Else
.Clear
.FixedRows = 0
End If
End With