IListSource Interface
Assembly: System (in system.dll)
/** @attribute TypeConverterAttribute("System.Windows.Forms.Design.DataSourceConverter, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") */
public interface IListSource
TypeConverterAttribute("System.Windows.Forms.Design.DataSourceConverter, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") public interface IListSource
Not applicable.
You typically use this interface to return a list that can be bound to a data source, from an object that does not implement IList itself.
Binding to data can occur at either run time or in a designer, but there are rules for each. At run time, you can bind to data in any of the following:
-
Implementer of IList, provided the implementer has a strongly typed Item property (that is, the Type is anything but Object). You can accomplish this by making the default implementation of Item private. If you want to create an IList that follows the rules of a strongly typed collection, you should derive from CollectionBase.
-
Implementer of ITypedList.
In a designer, you can initialize binding to Component objects by following the same rules.
Note: |
|---|
| Implementers of IListSource can return an IList that contains a collection of IList objects. |
The following code example demonstrates how to implement the IListSource interface. A component named EmployeeListSource exposes an IList for data binding by implementing the GetList method. For a full code listing, see How to: Implement the IListSource Interface.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Note: