I'm trying to refresh my DBGrid after I've clicked a button to delete all the data. I've tried refresh with no results. I've tried Refresh on the DBGrid1 and on the Data object and even on the Form.
Asked
Active
Viewed 316 times
-2
-
Just clear your recordset and re-fetch the data. – Nadeem_MK Sep 15 '14 at 15:57
-
how did you fetch the data the 1st time? call the method again, but dispose your recordset before calling it – Nadeem_MK Sep 15 '14 at 16:01
-
When the page opens it binds the data automatically when you have the data object and the grid object. And if I close the form and open it again, it refreshes the data, but I need to manually do this somehow with the button click event. – user3653252 Sep 15 '14 at 16:06
-
Post your code, i'll edit it for you – Nadeem_MK Sep 15 '14 at 16:07
-
Private Sub cmdSubmit_Click() DBGrid1.ClearFields ' – user3653252 Sep 16 '14 at 13:29
-
If I was doing this in .NET, I'd just put the dbgrid in an update panel. – user3653252 Sep 16 '14 at 13:41
-
In fact, you need to unbound the recordset to the grid, update the recordset and rebind it. – Nadeem_MK Sep 16 '14 at 14:58
1 Answers
0
What I did was just gave them a pop-up indicating the action was complete and then closed the form. If they want to look at the blank list, they can click on the button to view it again.
user3653252
- 23
- 6