Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

populate a mshflexgrid

Status
Not open for further replies.

kimtp

Programmer
Jun 15, 2002
310
US
When populating a mshflexgrid, the first column is MT. How to have the first line to be the starting point? So far I have
Code:
    With flgTracks
        .AddItem rst!trackid & vbTab & rst!Title & vbTab & rst!Duration
    End With
    flgTracks.Col = 0
    flgTracks.Sort = 1
    rst.MoveNext
    Loop
    rst.Close
sorting on the Track.

The info populating the grid comes from a treeview. On the double click, the grid is cleared and the new data is added. However, After the grid is cleared the new data is added at the end where the old data was listed. Thus leaving several blank rows. How to correct?
Code:
Private Sub flgSetHeaders() 'called by the grid_click event
    With flgTracks
        .Clear
        .FixedCols = 1
        .FixedRows = 1
        .TextMatrix(0, 0) = "Track"
        .TextMatrix(0, 1) = "Title"
        .TextMatrix(0, 2) = "Length"
        .ColWidth(0) = 500
        .ColWidth(1) = 4320
        .ColWidth(2) = 770
        .Width = 5925
    End With
End Sub
Thanx for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top