Retrieving values from a row marked as Deleted

  • Thread starter Thread starter Giri
  • Start date Start date
G

Giri

Rowstate of a row is deleted.. However, just before doing an update against
the dataset I'd like to retrieve some values out of the "deleted" row..

Is is possible?


Giri
 
Hi, Giri

You might be able to get the values of that deleted row from DataTable.RowDeleted event

Bin Song, MC

----- Giri wrote: ----

Rowstate of a row is deleted.. However, just before doing an update agains
the dataset I'd like to retrieve some values out of the "deleted" row.

Is is possible


Gir
 
This is definitely possible.

// assume that first row in the DataTable dt has its rowstate set to
deteled).
DataRow dr = dt[0];

// to get a column called "description" from this row
String sDescription = dr["description", DataRowVersion.Original].ToString();

// to get a column called "ProductID" from this row
Int32 productID = (Int32) dr["ProductID",
DataRowVersion.Original].ToString();

If you're using VB.NET then go into the documentation and look at the Item
property for the DataRow class.

HTH,
 
Hi Giri,

I'd like to know if this issue has been resolved yet. Is there anything
that I can help. I'm still monitoring on it. If you have any questions,
please feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
 
Back
Top