Solved - remove item from listview

Posted on 2009-12-16
Last Modified: 2012-05-08
hello there,
I would like to have a button that can set the text from a textbox as the first item of the listview and then clear that specific item from the listview.. how can I do that?
Question by:XK8ER
    LVL 9

    Expert Comment

    by:Trideep Patel
    For adding textbox item at first position
    use this

     Dim ivItem As New ListViewItem(TextBox1.Text)
     ListView1.Items.Insert(0, ivItem)
    LVL 1

    Author Comment

    I mean I would like for textbox1.text = first item from listview
    then clear first item of listview
    LVL 85

    Accepted Solution

    That would be:

            If ListView1.Items.Count > 0 Then
                TextBox1.Text = ListView1.Items(0).Text
            End If

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Introduction When many people think of the WebBrowser ( control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
    Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now