rowstate

Issue with DataRow state in DataTable

I have a very strange requirement using DataTable. I have a datatable with some columns. Nwo whenever there is any change in any of the DataRow in the datatable; then the state of DataRow is set to modified. That is OK. But for one exceptional column I don't want this behavior. I want that any change in any row for this particular column...

DataAdapter.Fill() behavior for row deleted at the data source

I'm using the DataSet/DataTable/DataAdapter architecture to mediate between the database and my model objects, which have their own backing (they aren't backed by a DataRow). I've got a DataAdapter with AcceptChangesDuringFill = False, AcceptChangesDuringUpdate = False, and FillLoadOption = OverwriteChanges. Here's my understanding of th...

Maintain DataRowState in ADO.NET Dataset - RejectChanges() method does not work?

The problem simplified: I have a DataSet with some datatables... I have a Winforms DataGrid bound to one of the datatables. User sticks some rows into said datatable, via the DataGrid, let's say 3 rows; All three rows now have their RowState = DataRowState.Added. I now begin a sqlserver transaction. Then call dataAdapter1.Update(dat...

Extend DataControlRowState for GridView?

How would I extend DataControlRowState for GridView? I have a gridview that already extend the base gridview class. I'd like to add an additional "rowstate" called "Disabled". How would I go about doing this? I guess what this is really about it how to extend an enum? Can it even be done? Upon further reading, it appears this can't b...

Preserving DataRowState when serializing DataSet using DataContractSerializer

For various reasons I am having to send a typed dataset to a WCF service endpoint. This works fine except that upon Deserializing, the RowState of each row in each DataTable is set to 'Added', regardless of what they were on the client. If I write the serialized stream out to a file, I see that the RowState is not part of the Serialized ...

DataRow which is added is not going to be delete doing table.Rows[i].Delete() ?

Why is that? The state of the datarow is added. When I delete the row the state is unchanged. Why not deleted? Thats the reason my Delete Store Procedure is never called! edit: the datarow is freshly added and then I try to delete it. ...