Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clear DBGrid

Status
Not open for further replies.

nanin

Programmer
Aug 29, 2003
13
ES
I have inserted a DBgrid component which needs to be cleared from time to time. It's connected to DataSource component which is connected to an ADO connection component. Any idea?
 
Yes... you have to disable the grid you want to empty out, do a empty table command and then enable it again. Here's the code:

Table1->Active = false;
Table1->EmptyTable();
Table1->Active = true;

If you don't disable the grid, the program will crash on you. That is the only tricky part.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top