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


データの取得後、PerformDataBinding メソッドが呼び出されてデータ バインド コントロールの要素にデータをバインドします。既定の実装が適切でない場合にのみ、派生型がこのメソッドをオーバーライドしてデータを取得します。通常、PerformDataBinding メソッドを実装しないで、カスタムのデータ作業を実行する DataSourceViewSelectCallback デリゲートを用意するだけで十分です。

PerformSelect メソッドをオーバーライドして、GetData メソッドを使用して関連するデータ ソースからデータを取得し、コントロールの要素にバインドする方法を次のコード例に示します。このコード例は、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.PerformSelect メソッドを検索する場合は、下記のリンクをクリックしてください。

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