ADO Getchanges() method doesnt show deleted?

  • Thread starter Thread starter trinitypete
  • Start date Start date
T

trinitypete

Hi all,

I have a datagrid bound to a dataset containing 1 table
(DataSet1). I have another datagrid that is bound to a
datatable which is created on the Rowchanging event of the
table in DataSet1.

The datatable is created in the following way:

DataTable mychanged = new DataTable();
mychanged = mydata.Tables["Table1"].GetChanges();
dataGrid5.DataSource = mychanged;

Now if I delete a row in the first datagrid, the row
changing event of the table in DataSet1 fires, which as
far as I can see should create the Datatable which
contains 1 row - the deleted row, but nothing ends up in
the datatable. I have alsio tried a similar thing using
dataset.getchanges but with the same results.

Datatable.HasChanges returns true?

Thanks in advance - Pete
 
You got it ;)


--
Peter Wright
Author of ADO.NET Novice To Pro, from Apress Inc.


_____________________________
trinitypete said:
Think I have got it. Deleted rows can not be displayed in
a datagrid without using a dataview.

Pete.
-----Original Message-----
Hi all,

I have a datagrid bound to a dataset containing 1 table
(DataSet1). I have another datagrid that is bound to a
datatable which is created on the Rowchanging event of the
table in DataSet1.

The datatable is created in the following way:

DataTable mychanged = new DataTable();
mychanged = mydata.Tables["Table1"].GetChanges();
dataGrid5.DataSource = mychanged;

Now if I delete a row in the first datagrid, the row
changing event of the table in DataSet1 fires, which as
far as I can see should create the Datatable which
contains 1 row - the deleted row, but nothing ends up in
the datatable. I have alsio tried a similar thing using
dataset.getchanges but with the same results.

Datatable.HasChanges returns true?

Thanks in advance - Pete



.
 
Back
Top