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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove item from Listview box

Status
Not open for further replies.

konLao

Programmer
Mar 10, 2003
61
US
Hi all,
How can I remove item from listview control. I'm not using checkbox though.

Thanx
 
thisform.oListview.RemoveItem(1)

...1 or whatever the index number is of the item you want to remove

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
Slighthaze,
Thanks for a quick response. I still "OLE error code 0x80020006; Unkown name" error at that line. Any idea?
 
Maybe try...this is assuming that the OLEControl on your form is named oListview of course...sometimes with ActiveX controls you have to call to the contained object instead in order to get it to work. This is only a guess, if you are still having problems post back and I will go figure it out in VFP for you.

thisform.oListview.object.RemoveItem(1)

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
konlao,

How about this:

thisform.oListview.ListItems.Remove(1)

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
That's what I get for trying to guess at first...sorry about that, I'm usually a pretty good guesser. :eek:)

Glad I could help.

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top