次の方法で共有


DesignTimeData.GetSelectedDataSource メソッド

定義

指定したコンポーネントのサイト プロパティで表され、デザイン ホストでの名前で選択されたデータ ソースを取得します。

オーバーロード

GetSelectedDataSource(IComponent, String)

指定したコンポーネントのサイト プロパティで表され、指定したデータ ソース名で識別され、デザイン ホストでの名前で選択されたデータ ソースを取得します。

GetSelectedDataSource(IComponent, String, String)

指定したコンポーネントのサイト プロパティで表され、指定したデータ ソース名とメンバー名で識別され、デザイン ホストでの名前で選択されたデータ ソースを取得します。

GetSelectedDataSource(IComponent, String)

指定したコンポーネントのサイト プロパティで表され、指定したデータ ソース名で識別され、デザイン ホストでの名前で選択されたデータ ソースを取得します。

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

パラメーター

component
IComponent

データ ソースを格納している IComponent オブジェクト。

dataSource
String

取得するデータ ソースの名前。

戻り値

Object

選択したデータ ソースを表す IListSource または IEnumerable を実装するオブジェクト。データ ソースまたはデザイナー ホストにアクセスできなかった場合は null

こちらもご覧ください

適用対象

GetSelectedDataSource(IComponent, String, String)

指定したコンポーネントのサイト プロパティで表され、指定したデータ ソース名とメンバー名で識別され、デザイン ホストでの名前で選択されたデータ ソースを取得します。

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

パラメーター

component
IComponent

データ ソースとなっているプロパティを格納している IComponent を実装するオブジェクト。

dataSource
String

取得するデータ ソース。

dataMember
String

取得するデータ メンバー。

戻り値

IEnumerable

データ メンバーを含む IEnumerable を実装するオブジェクト。データ ソース、メンバー、またはコンポーネントのサイトにアクセスできなかった場合は null

こちらもご覧ください

適用対象