0

カスタム オブジェクトのリストがあり、それを ListView にバインドして、ListView で変更をコミットすると、元の List も影響を受けるようにする必要があります。また、ListView には、選択したヘッダーのみ (つまり、ID と名前のみ) を含める必要があります。ListView と DataGridView で同じことを行う必要があります。LINQ を使用してこれを行う方法はありますか?このジョブに正しいコレクション型を使用していますか?

これが私のデータの例です:

Public Class DataStruct
        Public Property DateCreated As DateTime
        Public Property DateModified As DateTime
        Public Property ID As Types.ID
        Public Property Location As String
        Public Property Name As String
        Public Property Notes As String
End Class

Public Sub Populate()
        Dim MyCollection As New List(of DataStruct)
        'populate list with items

        'display on a listview
End Sub

プロジェクトは、Visual Basic (Framework 4.5) の Windows フォームです。どんな助けでも大歓迎です。

4

0 に答える 0