No database involved here, I am creating my own datatable in code, and binding it to a textbox and a datagridview.
When I change current record in the grid the textbox updates to the current value.
But what's the best way to synchronise changes between the values in the textbox and the datagrid. If I change one then it doesn't change the other unless I go to another record and back.
I can do this by adding a datagrid.Refresh() to the textbox Validated event, and presumably something to the CellValidated event on the datagrid, but it seems like I might be going about this the wrong way.
Edit:
Based on the answer below, my question should be: is there a way to notify bound controls of changes in a DataTable they are bound to, or must the code use a BindingList or do it manually instead.