Wednesday, May 11, 2005

ADO.NET: When has the data changed?

I am still struggling with ADO.NET and databinding in particular.(see my earlier post 'In quest for the ADO.NET AfterEdit event') .

In this episode: When has the data changed?

In a datagrid
If I have a datagrid bind to a dataset-table, and I edit a value (without navigating to another record) the DataSet.HasChanges function returns true. That is correct! After that you can call GetChanges or AcceptChanges. (This is expected behavior)

In a textbox
If I have a textbox bind to a dataset-table-field and I edit the value (without navigating to another record) the HasChanges function returns false. (!?) In other words the change is not commited to the dataset.

But......
I can Accept those changes with AcceptChanges????? This is very strange!

Again: What am i missing?
(I know VCL's TDataSet! :-) )

No comments:

Use an image as your UIBarButtonItem

Using an image as your UIBarButtonItem in your navigationcontroller bar can only be achieved by using a common UIButton as the BarButtonItem...