DataBoundControl.GetData メソッド
アセンブリ: System.Web (system.web.dll 内)

Dim returnValue As DataSourceView returnValue = Me.GetData
データ操作を実行するためにデータ バインド コントロールが使用する DataSourceView。DataMember プロパティが設定されている場合、特定の、名前付き DataSourceView が返されます。それ以外の場合は、既定の DataSourceView が返されます。


GetData メソッドは、GetDataSource メソッドを呼び出すことで、関連するデータ ソース コントロールから DataSourceView オブジェクトを取得します。DataSource プロパティを使用してデータ ソースを指定すると、既定の DataSourceView オブジェクトが作成されます。

GetData メソッドを呼び出して、関連するデータ ソース コントロールから DataSourceView オブジェクトを取得する方法、および Select メソッドを呼び出して、データを取得する方法を次のコード例に示します。このコード例は、DataBoundControl クラスのトピックで取り上げているコード例の一部分です。
Protected Overrides Sub PerformSelect() ' Call OnDataBinding here if bound to a data source using the ' DataSource property (instead of a DataSourceID) because the ' data-binding statement is evaluated before the call to GetData. If Not IsBoundUsingDataSourceID Then OnDataBinding(EventArgs.Empty) End If ' The GetData method retrieves the DataSourceView object from the ' IDataSource associated with the data-bound control. GetData().Select(CreateDataSourceSelectArguments(), _ AddressOf OnDataSourceViewSelectCallback) ' The PerformDataBinding method has completed. RequiresDataBinding = False MarkAsDataBound() ' Raise the DataBound event. OnDataBound(EventArgs.Empty) End Sub 'PerformSelect
protected override void PerformSelect() { // Call OnDataBinding here if bound to a data source using the // DataSource property (instead of a DataSourceID), because the // databinding statement is evaluated before the call to GetData. if (! IsBoundUsingDataSourceID) { OnDataBinding(EventArgs.Empty); } // The GetData method retrieves the DataSourceView object from // the IDataSource associated with the data-bound control. GetData().Select(CreateDataSourceSelectArguments(), OnDataSourceViewSelectCallback); // The PerformDataBinding method has completed. RequiresDataBinding = false; MarkAsDataBound(); // Raise the DataBound event. OnDataBound(EventArgs.Empty); }

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からDataBoundControl.GetData メソッドを検索する場合は、下記のリンクをクリックしてください。

- DataBoundControl.GetData メソッドのページへのリンク