troubleshooting Question

Updating Datagrid

Avatar of running32
running32 asked on
Visual Basic.NET
10 Comments1 Solution227 ViewsLast Modified:
I have a datagird in my windows form.   l'm having problems updating the dataset and writing back to the database.   On a mousedown event I want to add the username and date.  This works.   I then need to write in some comments then update the datagrid.   My problem is that it will not update.

 pt = New Point(e.X, e.Y)
        Dim testdate As String
       Dim hti As DataGrid.HitTestInfo = DataGrid2.HitTest(pt)
        If hti.Type = DataGrid.HitTestType.Cell Then
            DataGrid2.CurrentCell = New DataGridCell(hti.Row, hti.Column)
            DataGrid2.Select(hti.Row)
            DataGrid2.Item(hti.Row, 2) = UserName 'Column 3
            DataGrid2.Item(hti.Row, 1) = Now 'Column 3

        End If
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 10 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros