Groups | Blog | Home
all groups > vb.net data > march 2006 >

vb.net data : [VB2003] Deleting row doesn't set HasChanges?



marshallarts
3/17/2006 10:25:43 PM
I have a datagrid on a form. The data source for the datagrid is a
DataView onto a Dataset. I have a button which allows the user to
delete the currently-selected row. When I do this, the row does
disappear from the grid, so I must be deleting it from the Dataset OK.
But when I close the form, I need to update any changes back to the
data source. I test for Dataset.HasChanges, but it is not set to true!
I have also tried doing a GetChanges into a temporary dataset, but it
is always empty.

What am I missing here? The data source is an MS Access mdb file.
Thanks.
Cor Ligthert [MVP]
3/20/2006 12:00:00 AM
Marshallarts,

I am not active in this newsgroup. I see that I am not the only one. I give
you the answer after this, however you can better try next time the
newsgroups

microsoft.public.dotnet.languages.vb
or
microsoft.public.dotnet.framework.adonet.

Your current question can be asked in both.

Probably are you using version 2002/2003 and does is your data not pushed
into the datasource. For that you can than use the endcurrentedit.

See here a sample. And don't use it in this way, using the paint event is
not really the best way, it was however easy to show it in a sample.

http://www.vb-tips.com/default.aspx?ID=30d9d2fd-9f10-4928-b7c8-1def3152436f

I hope this helps,

Cor


"marshallarts" <stevem@westnet.net.au> schreef in bericht
news:1142663142.976972.76880@e56g2000cwe.googlegroups.com...
[quoted text, click to view]

AddThis Social Bookmark Button