Hi All,
I want to use the data grid as input interface.
Can any one help how to start.
i need 3 columns date, name, location
the location field is drop down field user can select from the list only.
the values entered by user should update in the database.


your help is most appreciated :icon_wink:

Vijay

Try binding the datagrid to a database table.

I don't want to bind it with control, other than this any thing:(

just use datagrid1.textmatrix. .

I don't want to bind it with control, other than this any thing:(

Try using disconnected recordset, then apply the recordset to the database after editing.

Dim rst As New ADODB.Recordset
Dim xData(2, 1) As String
 
Private Sub Form_Load()
xData(0, 0) = "23"
xData(0, 1) = "Michael Jordan"
xData(1, 0) = "24"
xData(1, 1) = "Kobe Bryant"
xData(2, 0) = "33"
xData(2, 1) = "Grant Hill"
With rst
    .Fields.Append "idno", adInteger
    .Fields.Append "names", adVarChar, 30
    .CursorType = adOpenKeyset
    .Open
    For Index = 0 To UBound(xData)
        .AddNew
        .Fields("idno") = CInt(xData(Index, 0))
        .Fields("names") = xData(Index, 1)
        .Update
    Next
End With
Set DataGrid1.DataSource = rst
End Sub