Επεξεργασία

Κοινή χρήση μέσω


DesignTimeData.GetSelectedDataSource Method

Definition

Gets a data source selected by name in the design host, represented by the specified component's site property.

Overloads

GetSelectedDataSource(IComponent, String)

Gets a data source selected by name in the design host, represented by the specified component's site property and identified by the specified data source name.

GetSelectedDataSource(IComponent, String, String)

Gets a data source selected by name in the design host, represented by the specified component's site property and identified by the specified data-source name and member name.

GetSelectedDataSource(IComponent, String)

Gets a data source selected by name in the design host, represented by the specified component's site property and identified by the specified data source name.

public:
 static System::Object ^ GetSelectedDataSource(System::ComponentModel::IComponent ^ component, System::String ^ dataSource);
public static object GetSelectedDataSource (System.ComponentModel.IComponent component, string dataSource);
static member GetSelectedDataSource : System.ComponentModel.IComponent * string -> obj
Public Shared Function GetSelectedDataSource (component As IComponent, dataSource As String) As Object

Parameters

component
IComponent

The IComponent object that contains the data source.

dataSource
String

The name of the data source to retrieve.

Returns

An object implementing either IListSource or IEnumerable representing the selected data source, or null if the data source or the designer host could not be accessed.

See also

Applies to

GetSelectedDataSource(IComponent, String, String)

Gets a data source selected by name in the design host, represented by the specified component's site property and identified by the specified data-source name and member name.

public:
 static System::Collections::IEnumerable ^ GetSelectedDataSource(System::ComponentModel::IComponent ^ component, System::String ^ dataSource, System::String ^ dataMember);
public static System.Collections.IEnumerable GetSelectedDataSource (System.ComponentModel.IComponent component, string dataSource, string dataMember);
static member GetSelectedDataSource : System.ComponentModel.IComponent * string * string -> System.Collections.IEnumerable
Public Shared Function GetSelectedDataSource (component As IComponent, dataSource As String, dataMember As String) As IEnumerable

Parameters

component
IComponent

The object implementing IComponent that contains the data sourced property.

dataSource
String

The data source to retrieve.

dataMember
String

The data member to retrieve.

Returns

An object implementing IEnumerable containing the data member, or null if the data source, member, or component's site could not be accessed.

See also

Applies to