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!

Removing columns from a listview

Status
Not open for further replies.

peteij

IS-IT--Management
Feb 23, 2001
18
GB
I am using a listview where I want to show different columns. I have no problem populating the list view, but when I add new columns I still have the old columns. How do I get rid of them?

Thanks.
 
you can clear a list with list1.clear Craig, mailto:sander@cogeco.ca

"Procrastination is the art of keeping up with yesterday."

I hope my post was helpful!!!
 
The columns are in a collection, and columnheaders are added to the collection to define the columns. For example:

lvwList.ColumnHeaders.Add , , "Contract", lvwList.Width * 0.3

The columns(collection) must be cleared before you can change the columns. Try this:

lvwList.ColumnHeaders.Clear

Then add the new column headers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top