How to populate an unbound DataGrid?

How to populate an unbound DataGrid?

Post by slinde » Sun, 02 May 1999 04:00:00



I can populate the list box with a simple command, but I'll bet the
DataGrid is much
more complicated.  Can anyone help?

Private Sub ShowRecordset(R As Recordset)
'Loop through the recordset and format the records
'for display in a list box.
Dim RowString As String

  Do While Not R.EOF
    ReadRecord R
    RowString = sProcTypeID & " " & sPrivCmptTypeID & " " & sIconFile
    frmDAO.List1.AddItem RowString
    frmDAO.DataGrid1 = ?????
    R.MoveNext
  Loop
  R.Close
End Sub

Thanks in advance,
Dean

 
 
 

How to populate an unbound DataGrid?

Post by J DeMeyer, AL » Tue, 04 May 1999 04:00:00



>I can populate the list box with a simple command, but I'll bet the
>DataGrid is much
>more complicated.  Can anyone help?

>Private Sub ShowRecordset(R As Recordset)
>'Loop through the recordset and format the records
>'for display in a list box.
>Dim RowString As String

>  Do While Not R.EOF
>    ReadRecord R
>    RowString = sProcTypeID & " " & sPrivCmptTypeID & " " & sIconFile
>    frmDAO.List1.AddItem RowString

frmDAO.DataGrid1.Row=TheRow
frmDAO.DataGrid1.Col=TheColumn
frmDAO.DataGrid1.Text=RowString

You probably want to change TheColumn so that your data ends up in correct
columns.  With every record, you probably want to change TheRow.

Joe

Quote:>    frmDAO.DataGrid1 = ?????
>    R.MoveNext
>  Loop
>  R.Close
>End Sub

>Thanks in advance,
>Dean


 
 
 

1. populating an unbound DBGrid

Does anyone know how to populate an unbound DBGrid (VB4 cust control by
Apex), say from an array?

In ver 3 (True Grid), you could use the Fetch event. VB4 supposedly has
the corresponding Rowloaded event. At least, online books says so.
However, for the life of me, i can't seem to find the Rowloaded event in
the (Proc) Events combo box.

IS this a bug, or is my Enterprise ed. of VB4 outdated, or is there
another way around this?

Thanx in advance.

Jimm

2. US-NY-SENIOR TEAM LEAD FINANCIALS FUNCTIONAL

3. Can Unbound Combo boxes be populated using DOA?

4. oracle images to vb form

5. Enumerate and Populate Unbound Text Controls?

6. start Gateway and Online in rc file

7. Datagrids, Unbound Forms & ADO

8. how to link to database

9. Unbound Datagrid Confusion!

10. datagrid unbound columns ?

11. datagrid with unbound columns ?

12. DATAWIDGET: Unbound DataGrid-Problem

13. MS DataGrid does not populate under Access 2000