What a wierd bug or feature?

A couple of days back i was working on an app, when i came across this problem. So the thing is that there are two events in DataTable, one is called OnRowChanging and the other is called OnRowChanged. Well i figured since i wanted to access the newly added row in the table OnRowChanged would be a good choice. Well as it turns out the row isn't added to the table in the OnRowChanged event infact there is no event which you can catch after the row has been added to the table. Now is that a bug or is it by design?
 
So the workaround that i had to do was to get the row from the DefaultView of the table. The defaultView needs to have the newly added row so that any controls that are bound correctly show newly added rows.

No Comments