Monday, May 16, 2016

AcceptChanges and Rejectchanges

Acceptchanges –
 
We can accept the changes by using AcceptChanges method of the DataRow, Datatable and dataset , this method set the current row value to be original value and also acceptchanges method accept all the changes for entire datatable.

Syntax of the Acceptchanges
ds.Tables[0].Rows[0].AcceptChanges();

RejectChanges – 
By using the Rejectchanges method to the datarow the old value become discard .

Syntax of the Rejectchanges

ds.Tables[0].Rows[0].Rejectchanges();

No comments:

Post a Comment