GridView.CreateChildControls(IEnumerable, Boolean) メソッド

定義

指定したデータ ソースを使用して GridView コントロールをレンダリングするために使用するコントロール階層を作成します。

protected:
 override int CreateChildControls(System::Collections::IEnumerable ^ dataSource, bool dataBinding);
protected override int CreateChildControls(System.Collections.IEnumerable dataSource, bool dataBinding);
override this.CreateChildControls : System.Collections.IEnumerable * bool -> int
Protected Overrides Function CreateChildControls (dataSource As IEnumerable, dataBinding As Boolean) As Integer

パラメーター

dataSource
IEnumerable

GridView コントロールのデータ ソースを含むIEnumerable

dataBinding
Boolean

true 子コントロールがデータにバインドされていることを示す場合。それ以外の場合は false

返品

作成された行の数。

例外

dataSource は null DataSourceViewを返します。

-または-

dataSourceICollection インターフェイスを実装せず、 TotalRowCountを返すことができません。

-または-

AllowPagingtrue であり、 dataSourceICollection インターフェイスを実装せず、データ ソースのページングを実行できません。

-または-

dataSource では、 ICollection インターフェイスは実装されず、 dataBindingfalse に設定されます。

注釈

CreateChildControls メソッドは、GridView コントロールのコントロール階層を作成するために使用されます。

Note

このメソッドは、主にコントロール開発者が GridView コントロールを拡張するために使用されます。

適用対象

こちらもご覧ください