Results 1 to 3 of 3

Thread: [RESOLVED] Detect/change row selected with ListView on CF20

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2002
    Posts
    352

    Resolved [RESOLVED] Detect/change row selected with ListView on CF20

    I finally have all my data imported to my handheld and stored in a SqlCe db.

    I have some records filtered and displayed in a ListView control in detail mode to create a simple table. When an item (row) in the listview is clicked, I need to open another form based on the value of the first column (Primary Key Id) on the selected row.

    Maybe in the SelectedIndexChanged Event:

    Code:
    lvListView_SelectedIndexChanged
    What is the proper method in CF20. I do not see a Click or DoubleClick event for the ListView control.

    Also, is it possible to change the selected row with code to simulate a move previous or move next, etc...

    Thanks.
    Last edited by easymoney; May 17th, 2007 at 07:48 AM.

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Detect/change row selected with ListView on CF20

    Hi,
    use the selectedindexchanged event
    Something like...

    Code:
     iSel = -1
            If lvEnquiries.SelectedIndices.Count <= 0 Then
                Exit Sub
            End If
    
    
            Try
                Isel = lvEnquiries.SelectedIndices(0)
                If Isel < 0 Then
                    Exit Sub
                End If
            Catch
            End Try
    Pete
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2002
    Posts
    352

    Re: Detect/change row selected with ListView on CF20

    Awesome

    I had the right event, just wasn't sure how to utilize the proper code. Excellent method.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width