I have a VB.Net app that displays some data in a datagrid. Everything works great except updating the database. It seems that the datagrid wont update the dataset until the user selects another row in the grid. That's fine and dandy IF the user moves to the next row but what if the user updates a field then clicks out of the grid on a different control like a command button or menu item. The changes aren't updated in the dataset which means no changes in the database. So my question is how can I force the datagrid to update the dataset when the user moves out of the grid?
Here is the code that I am using to update the database from the dataset.
Private Sub dgTB_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles dgTB.CurrentCellChanged
If dsFAACA.HasChanges Then
Dim cb As New SqlCommandBuilder(daAdapter)