title | description | ms.date | dev_langs | helpviewer_keywords | ms.assetid | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
How to: Implement the ITypedList Interface |
Learn how to implement the ITypedList Interface to enable discovery of the schema for a bindable list. |
03/30/2017 |
|
|
834cc15c-50bc-4a8b-a610-313d6a217357 |
Implement the xref:System.ComponentModel.ITypedList interface to enable discovery of the schema for a bindable list.
The following code example demonstrates how to implement the xref:System.ComponentModel.ITypedList interface. A generic type named SortableBindingList
derives from the xref:System.ComponentModel.BindingList%601 class and implements the xref:System.ComponentModel.ITypedList interface. A simple class named Customer
provides data, which is bound to the header of a xref:System.Windows.Forms.DataGridView control.
[!code-csharpSystem.ComponentModel.ITypedList#1] [!code-vbSystem.ComponentModel.ITypedList#1]
[!code-csharpSystem.ComponentModel.ITypedList#10] [!code-vbSystem.ComponentModel.ITypedList#10]
[!code-csharpSystem.ComponentModel.ITypedList#100] [!code-vbSystem.ComponentModel.ITypedList#100]
This example requires:
- References to the System.Drawing and System.Windows.Forms assemblies.
- xref:System.ComponentModel.ITypedList
- xref:System.ComponentModel.BindingList%601
- xref:System.ComponentModel.IBindingList
- Data Binding and Windows Forms