Click here to Skip to main content
16,007,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Addresses table has two rows. If first row is modified, HasChanges function is working as expected.
If second is modified, HasChanges function is not working as expected.
Please let me know how to rectify this. Thanks in advance.

DataTable dt = data.Tables["Addresses"];
     this.BindingContext[dt].EndCurrentEdit();
             
     if (! data.HasChanges(DataRowState.Modified))
	return false;


What I have tried:

after keeping below lines, it started recognizing first row changes.

DataTable dt = data.Tables["Addresses"];
     this.BindingContext[dt].EndCurrentEdit();
Posted
Comments
Karthik_Mahalingam 31-Oct-17 22:48pm    
try HasChanges()
Krish Agn 1-Nov-17 0:46am    
tried HasChanges() as well. its not working

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900