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
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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.
Perhaps if you showed us the code where you populate the list view it would be clearer...
Cheers,
Raymond.
ASKER
I make some other thing wrong, your
method works very well, thank you.
method works very well, thank you.
The Neil