Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 2.29 KB

how-to-implement-the-itypedlist-interface.md

File metadata and controls

43 lines (32 loc) · 2.29 KB
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
csharp
vb
ITypedList interface
BindingList(Of T) class
data binding [Windows Forms], implementing
IBindingList interface
834cc15c-50bc-4a8b-a610-313d6a217357

How to: Implement the ITypedList Interface

Implement the xref:System.ComponentModel.ITypedList interface to enable discovery of the schema for a bindable list.

Example

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]

Compiling the Code

This example requires:

  • References to the System.Drawing and System.Windows.Forms assemblies.

See also

  • xref:System.ComponentModel.ITypedList
  • xref:System.ComponentModel.BindingList%601
  • xref:System.ComponentModel.IBindingList
  • Data Binding and Windows Forms