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
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.