Reputation: 2719
I have this code :
this.hRAddNewDataSet.Employee.RowChanged += new DataRowChangeEventHandler(Employee_RowChanged);
void Employee_RowChanged(object sender, DataRowChangeEventArgs e)
{
test++;
Trace.WriteLine(test.ToString());
}
When I run my app and edit one row and then click the save button, the RowChanged event will fire 35 time!. I know this because of the value for test var.
My Questions:
Upvotes: 0
Views: 1085
Reputation: 16858
why this event fire like this?
Perhaps you are wiring up the event handler multiple times?
Or maybe some part of your code is changing the row multiple times?
How I can get the current column is being updated?
Use the ColumnChanged event and check the DataColumnChangeEventArgs
parameter.
Upvotes: 1