Implements ITypedList - but how?

Merrion

Well-known member
Joined
Sep 29, 2001
Messages
265
Location
Dublin, Ireland
User Rank
*Experts*
I have a collection which I wish to use as a databinding source. Therefore in the collection I have:
Code:
Public Class MyTypedCollection

    Inherits Collections.DictionaryBase
    Implements ITypedList

End Class

But ITypedList has two required functions and I really dont understand the documentation...what should go in:
Code:
    Function GetListName(ByVal listAccessors() As PropertyDescriptor) As String Implements ITypedList.GetListName
        \\ what goes here?
    End Function

    Function GetItemProperties(ByVal listAccessors() As PropertyDescriptor) As PropertyDescriptorCollection Implements ITypedList.GetItemProperties
        \\ What goes here as well?
    End Function
 
Its my understanding, if I remember correctly, that GetItemProperties should return the actual properties to be bound to. Say for instance you had a DataView-- you wouldnt want to bind to its properties, but instead bind to the properties of the DataTable it contains.

With a simple collection though I dont understand why you would need to implement this. IList would be the more appropriate choice.
 
Its not really a simple collection - I am overstating that part of things...it is a DictionaryBase derived collection of PrintJobs which have readonly, conditional read/write and should not be bound properties...
 
Back
Top