Link to home
Start Free TrialLog in
Avatar of chiwan
chiwan

asked on

How to delete records Tlistview

I am using Tlistview to store search
results, if I want to start a new
search, I want to delete the old
records in it, how to delete old records? I am using Tlistview.items.clear
but it not work, the old records still
inside, only clear Tlistview form.

Thanks & Rgds
Chiwan
Avatar of TheNeil
TheNeil

Try using the UpdateItems and Refresh methods for your TListView. You've cleared the items but it might not be redrawing it

The Neil
Items.Clear deletes all record that are stored in Items, so it should work, another issue if you are doing time consuming thing afterwards, e.g. immediatly after Items.Call, TListView is not updated.
ASKER CERTIFIED SOLUTION
Avatar of rwilson032697
rwilson032697

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chiwan

ASKER

I have tried both methods you point out,
but not work. I am just wonder should
I distroy Tlistview before I start a
new search.

Thank& Rgds

Chiwan
Can you calrify what you mean by "the old records still inside".

Perhaps if you showed us the code where you populate the list view it would be clearer...

Cheers,

Raymond.
Avatar of chiwan

ASKER

I make some other thing wrong, your
method works very well, thank you.