Problem with selecting row in a listView 
Author Message
 Problem with selecting row in a listView

Hi,

i've a little problem selecting row in a listView. I've fill this
ListView with data from a Excel File. Here's the code :

Dim xlWorkSheet As Excel.Worksheet
        xlApp = New Excel.Application()
        obooks = xlApp.Application.Workbooks
        'Ouverture du fichier
        xlbook = obooks.Open(Application.StartupPath & "\DoBeeps.xls")
        xlsheet = xlbook.Worksheets
        xlWorkSheet = xlsheet.Item(1)

        'Lecture des cellules du fichier excel et criture dans le
ListView
        Dim i As Integer
        For i = 3 To 7
            Dim item1 As New ListViewItem()
            item1.SubItems.Clear()
            item1.SubItems.Add(xlWorkSheet.Cells(i, 1).Text)
            item1.SubItems.Add(xlWorkSheet.Cells(i, 2).Text)

            ListView1.Items.Add(item1)
        Next

The problem : the ListView shows correctly the data but i can't select
a row clicking with the mouse... If i create a listView with Items I
entered myself, it works...
Do I make a mistake filling the ListView ?

Can you help me ?
Thanks a lot
Steve



Wed, 21 Sep 2005 21:08:22 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Select row in ListView Control

2. listview - initially selecting a row

3. How to select entire row in ListView ?

4. Select entire row in ListView

5. How to select a row by program code in a ListView with MultiSelection

6. How to select entire row in Listview

7. How to select entire row in ListView ? - FullRowSelect

8. How to select entire row in ListView ?

9. ListView - select a row

10. listview selected row

11. Selecting entire row in Listview?

12. Icons on selected rows in a listview

 

 
Powered by phpBB® Forum Software