Hi
I'm having a problem with the above.
I get different behaviour depending on what triggers the method call. Let me
explain.
I have a gridview on a form, with a save button. Both the click event from
this button, and the event from clicking the top right close X (_Closing)
trigger the same code :
/* make a copy of the dataview so we can query the row state without
affecting the display on the screen*/
DataTable dt = ((DataView) dGridDiary.DataSource).Table.Copy();
DataView dv = dt.DefaultView;
dv.RowStateFilter = DataViewRowState.ModifiedCurrent;
if (dv.Count!=0)
//save changed rows ...
Now this always works if triggered by the save button, but it only seems to
work when triggered by the (_Closing) if the user has moved from the modified
row.
Has anybody else seen this behaviour? Is there a way around it, besides
always saving the activerow?
Thanks in advance
|