DataTable的Remove是直接删除,不是标志为deleted. 如果使用Session保存修改,需要手工删除
DataTable.Rows[0].Delete()
DataTable.Remove();
Be aware that the behaviour from Remove and Delete is very different.
DataTable.Rows[0].Delete()
DataTable.Remove();
Be aware that the behaviour from Remove and Delete is very different.
> "Remove" removes a row from the datatable.
> "Delete" sets the DataRowState to "deleted", this of course not at rows
> which has no change or are added in the session. Those are removed with a
> Delete as well.
> You can say that Remove is a Delete with an inbuild acceptchanges for that
> row.