Reputation: 15455
I'm using DataBindings to an untyped DataTable like the following
textbox1.DataBindings.Add("Text", _dataTable, columnName );
Now the databinding works fine, however, I was checking the state of the row (after changing a value, of course) and it shows Unchanged. Just wondering shouldn't that be Modified?
_dataTable.Rows[0]
{System.Data.DataRow}
HasErrors: false
ItemArray: {object[11]}
RowError: ""
RowState: Unchanged
Table: {}
Upvotes: 0
Views: 565
Reputation: 15455
I used _dataTable.BeginEdit()
and _dataTable.EndEdit()
to changed the row state to Modified.
Upvotes: 0
Reputation: 4907
call _dataTable.AcceptChanges() to commit your changes to row.
Upvotes: 1