473,387 Members | 1,573 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to clear listview items

Hi

Can anyone tell me how to clear items from listview in vb.net 2003.
I tried the code as

Listview1.items.clear()

but it doesn't work.

is that any other method.
Mar 24 '07 #1
3 14774
Hi Dude, The code that you have will work and has to work.

Put that code before the listbox loads
for example
double click the listbox1 - then add the code next line
listbox1.items.clear then start loading the list box
listbox1.items.add("MALE")
listbox2.items.add("FEMALE")

Subbu


Hi

Can anyone tell me how to clear items from listview in vb.net 2003.
I tried the code as

Listview1.items.clear()

but it doesn't work.

is that any other method.
Mar 24 '07 #2
Hi

Check whether there is a method called Remove().
I dont know about vb.net but in C#, to remove some of the listview items from the list view you can use listviewname.items[index].Remove();


Regards,
TeenzoneZ
Mar 24 '07 #3
SammyB
807 Expert 512MB
Hi

Can anyone tell me how to clear items from listview in vb.net 2003.
I tried the code as

Listview1.items.clear()

but it doesn't work.

is that any other method.
It's actually easier:
Listview1.Clear()
Mar 24 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Islam Elkhayat | last post by:
In my Application i search my Employee database and view result in List View with 3 column.. here is the code: ######################################### private void textBox1_TextChanged(object...
0
by: Samuel R. Neff | last post by:
I'm having a index problem with ListView SubItems. If I add multiple columns to the listview and then add items with associated subitems, the ListView displays fine. Then if I delete a column via...
6
by: Nick | last post by:
Hi there, I'm trying to implement drag-drop for my listview control in large icon view mode. Unfortunately the order of the items gets completely messed up upon inserting the item back into the...
12
by: garyusenet | last post by:
I have had no replies to my previous post so perhaps I didn't write it good enough. Please excuse new thread but i wanted to break from the last thread hopefully this thread will be better. ...
3
by: RT | last post by:
Is there any way to make Listview items invisible or otherwise keep them from displaying? Seems like temporarily removing, then restoring later would be a severe runtime hit.
0
by: Peter | last post by:
Hi, I have a problem with Listview using checkboxes. If i check items by code BEFORE the form is shown the Listview.Items are confused during the ItemChecked Event !!! After showing the...
2
by: Peter | last post by:
Hi, I have a problem with Listview using checkboxes. If i check items by code BEFORE the form is shown the Listview.Items are confused during the ItemChecked Event !!! After showing the...
0
by: =?Utf-8?B?b3R0b21hdGlj?= | last post by:
Howdy, I have a site with a DIV that contains a ListView. The size of the DIV is so that exactlly three items can fit inside of it, so I use a DataPager to page it. When user calls new and the...
1
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, In my application I need to periodically remove all current items from a ListView and add a new set into it. The following abbreviated code contains the basic idea: private void...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.