Click here to Skip to main content
15,910,234 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,
i make an event handler to call a function when row changed, it seems i did something wrong or still missing and i copied the relative code only to not interrupt you, so please help me.

DataTable TableX= new DataTable();

// do required code to fill the data table and already filled.

TableX.RowChanged += new DataRowChangeEventHandler(Row_Changed);

protected void Row_Changed(object sender, DataRowChangeEventArgs e)
{

MessageBox.Show("changed");
}
Posted
Comments
Sascha Lefèvre 18-May-15 20:48pm    
There's nothing wrong with the code that you've shown. Why do you think it doesn't work?
Sinisa Hajnal 19-May-15 5:56am    
It seems correct. What actually happens when you use it (and how do you use it)?

1 solution

the issue fixed when i moved the adding of event handler each time before filling the data table inside the DataTable fill instead of putting it once in the form load, i don't know why but this is the case!!
 
Share this answer
 

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