Implements ITypedList - but how?

Merrion

Junior Contributor
Joined
Sep 29, 2001
Messages
265
Location
Dublin, Ireland
I have a collection which I wish to use as a databinding source. Therefore in the collection I have:
Visual Basic:
Public Class MyTypedCollection

    Inherits Collections.DictionaryBase
    Implements ITypedList

End Class

But ITypedList has two required functions and I really don't understand the documentation...what should go in:
Visual Basic:
    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
 
It's 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 wouldn't want to bind to its properties, but instead bind to the properties of the DataTable it contains.

With a simple collection though I don't understand why you would need to implement this. IList would be the more appropriate choice.
 
It's 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