[RESOLVED] [2008] Updating DataGridView on KeyDown
Hello all,
I have a DataGridView that doesn't seem to update itself correctly.
I have a column called, "Status" which is usually empty.
When the user presses "E" (for erase), they are asked "Are you sure".
Upon pressing Yes, a bound label on the form is updated to 'DELETED', which isn't being immediately shown in the DataGridView. I have to physically move up (or down) a row for 'DELETED' to be shown in the Status cell.
I've tried .Refresh, but it doesn't make any difference.
Any ideas?
Re: [2008] Updating DataGridView on KeyDown
have you tried DataGridView1.Update()?
Re: [2008] Updating DataGridView on KeyDown
Re: [2008] Updating DataGridView on KeyDown
Can you show us the code please? Which control is being handled the KeyDown event?
Re: [2008] Updating DataGridView on KeyDown
Thanks for your reply.
I've managed to fix it.
The label is on a TabControl which is disabled whilst the DataGridView is enabled.
I've had to enable to TabControl, write the text into the Label, and disable the TabControl again! Weird.