Hi all,
I'm facing some difficulties with the getchanges method of a datatable...
In my program, I have a standalone datatable which I'm using as the datasource to a datagridview. When I make changes to the datagridview, and I use the getchanges(DataRowState.Modified) method, I get Nothing as the result, no matter what changes I made. I also tried using the table as bindingsource to the datagridview but this didn't help either. Can anybody please point me out what I'm doing wrong? Below is my code:
- usr is an object that contains a table named table
- dgv is a datagridview on my form
- the update sub is a member of usr which is called when a button on the form is clicked
BindingSource1.DataSource = usr.table
BindingSource1.RaiseListChangedEvents = True
dgv.DataSource = BindingSource1
public sub update()
dim tmpdt as new datatable
tmpdt = table.getchanges(DataRowState.Modified)
end sub
Thanks in advance.