GridView::CreateChildControls Method (IEnumerable^, Boolean)
This API supports the product infrastructure and is not intended to be used directly from your code.
Creates the control hierarchy used to render the GridView control using the specified data source.
Assembly: System.Web (in System.Web.dll)
protected: virtual int CreateChildControls( IEnumerable^ dataSource, bool dataBinding ) override
Parameters
- dataSource
-
Type:
System.Collections::IEnumerable^
An System.Collections::IEnumerable that contains the data source for the GridView control.
- dataBinding
-
Type:
System::Boolean
true to indicate that the child controls are bound to data; otherwise, false.
| Exception | Condition |
|---|---|
| HttpException | dataSource returns a null DataSourceView. -or- dataSource does not implement the ICollection interface and cannot return a TotalRowCount. -or- AllowPaging is true and dataSource does not implement the ICollection interface and cannot perform data source paging. -or- dataSource does not implement the ICollection interface and dataBinding is set to false. |
Available since 2.0
