I have an interesting problem I hope you can help me with. The situtation is this, my appliction uses a datagridview bound to an access database. There is an edit button which puts the dgv into editable mode for the user. When the user had made the updates they want there is an update button which calls a function called update_action. This function makes the update calls to bring the access database current. There is a timer which starts when the user goes into edit mode and if the app is left in edit mode for a period of time the timer uses a delegate to call the same update_action function. If the user adds a row and then hits the down arrow leaving the cursor on an empty * row, then hits the update button everything works fine. If however the user does the same thing and instead of hitting the update button lets the timer time out and call the update_action function, the blank row is added to the table which causes an error to the effect that row x has no data when the grid is refreshed. The only difference in the two situtation is whether the updat_action function is called from a button push or by the timer. I have been at this for two days and have run out of ideas, anything you could suggest would be very appreciated. Thanks!


Can you please send code snippet it may help us to understand your well.

it very well might be that when the cursor is blinking in the box, that it causes a problem, how about in your delegate the first thing you do is change the focus. just fall object.Focus(); on anything else. most likely the button. which would be a good practice anyway since when a button is clicked it leaves a focus ring around itself, this would make it clear to the user that the update occurred, just as if the button was pressed.

Its likely the problem, and its all I can think of with only that information. Just give it a try. I bet you'll be surprised!

My thanks to Diamondrake. Changing the focus resolved the issue.