All,

I have just had to change my ListBox to a ListView. Now I need to keep an Object (Custom Class) in the ListView, this was fine when it was a list box as I just overrode the tostring method. How can I store the object in a listviews sub item or somewhere relative to the data row.

Thanks

Code is below I just need to add the object in as well

Code:
    Private Function populateListView(ByVal emailContact As ContactDetails) As Windows.Forms.ListViewItem
        Dim tmp As String = emailContact.AccountRef
        Dim itmp As New Windows.Forms.ListViewItem(tmp)

        Dim itmp2 As New Windows.Forms.ListViewItem.ListViewSubItem(itmp, CStr(emailContact.checkDataLevel))
        Dim itmp3 As New Windows.Forms.ListViewItem.ListViewSubItem(itmp, emailContact.EmailAddress)

        itmp.SubItems.Add(itmp2)
        itmp.SubItems.Add(itmp3)

        Return itmp
    End Function