System.Web.UI.ListSourceHelper.GetList Method

Retrieves an IList collection of data source objects.

Syntax

public static IList GetList (IDataSource dataSource)

Parameters

dataSource
An System.Web.UI.IDataSource that contains one or more associated System.Web.UI.DataSourceView objects, which are retrieved by a call to DataSourceControl.GetViewNames.

Returns

An IList of one System.Web.UI.IDataSource, if the System.Web.UI.IDataSource has one or more associated System.Web.UI.DataSourceView objects; otherwise, returns null.

Remarks

Use this method in an implementation of the DataSourceControl.System#ComponentModel#IListSource#GetList method, passing a reference to a data source control.

The IList object that is returned implements the System.ComponentModel.ITypedList interface. You can use the System.ComponentModel.ITypedList.GetItemProperties(System.ComponentModel.PropertyDescriptor[]) method to retrieve a list of System.ComponentModel.PropertyDescriptor descriptors that correspond to the System.Web.UI.DataSourceView names associated with the data source control from the list.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0