DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Doreen Guest

    CheckBox in ListView Control


    hi everyone, i'm using the listview control (Report Style) to display a number
    of records, which each row contain a checkbox. My problem is, now can i detect
    which row has been checked by the user?

    for example if the user want to delete certain row of record which has been
    checked.

    thanks for help!!!

  2. #2
    Randy Birch Guest

    Re: CheckBox in ListView Control

    Using the listview's intrinsic method ...

    Private Sub Command43_Click()

    Dim cnt As Long

    For cnt = ListView1.ListItems.Count To 1 Step -1

    If ListView1.ListItems(cnt).Checked Then

    ListView1.ListItems.Remove cnt

    End If

    Next

    End Sub


    --

    Randy Birch
    MVP Visual Basic
    http://www.mvps.org/vbnet/
    Please respond only to the newsgroups so all can benefit.


    "Doreen" <doreenluping@yahoo.com> wrote in message
    news:3dbbe3f0$1@tnews.web.devx.com...
    |
    | hi everyone, i'm using the listview control (Report Style) to display a
    number
    | of records, which each row contain a checkbox. My problem is, now can i
    detect
    | which row has been checked by the user?
    |
    | for example if the user want to delete certain row of record which has
    been
    | checked.
    |
    | thanks for help!!!



  3. #3
    Larry Rebich Guest

    Re: CheckBox in ListView Control

    Doreen:

    Some months ago I wrote a tip of the month that I call 'ListView Basics'.
    Link to http://www.buygold.net/tips then look for the July 2000 tip of the
    month. A sample program is provided. From the tip's intro:

    I have noted lots of posted questions in various news groups requesting
    information about the ListView control. So I created a very small demo which
    I zipped and placed on my web site in June 2000. There have been a lot of
    'downloads' of the demo so I decided to expand it and make it the
    tip-of-the-month.

    The ListView was introduced with Windows 95 as the 'right' side of Explorer.
    It was made available with VB4 32-bit. It is now available in VB6 as the
    Microsoft Windows Common Controls 6.0 OCX. The demo uses that version so you
    will need a copy if you want to run the demo. I used the SP5 version but I
    think earlier VB 6 versions will work.

    Cheers,
    Larry Rebich

    More tips link to:
    http://www.buygold.net/tips

    Please:
    No personal e-mail questions :-)

    "Doreen" <doreenluping@yahoo.com> wrote in message
    news:3dbbe3f0$1@tnews.web.devx.com...
    >
    > hi everyone, i'm using the listview control (Report Style) to display a

    number
    > of records, which each row contain a checkbox. My problem is, now can i

    detect
    > which row has been checked by the user?
    >
    > for example if the user want to delete certain row of record which has

    been
    > checked.
    >
    > thanks for help!!!




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links