Export (0) Print
Expand All

DetailsView.CreateChildControls Method (IEnumerable, Boolean)

Creates the control hierarchy used to render the DetailsView control.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

abstract CreateChildControls : 
        dataSource:IEnumerable * 
        dataBinding:bool -> int 
override CreateChildControls : 
        dataSource:IEnumerable * 
        dataBinding:bool -> int 

Parameters

dataSource
Type: System.Collections.IEnumerable
An IEnumerable that represents the data source for the DetailsView control.
dataBinding
Type: System.Boolean
true to indicate that this method is being called during data binding; otherwise, false.

Return Value

Type: System.Int32
The number of items in the data source.

ExceptionCondition
HttpException

dataSource returns a null DataSourceView.

- or -

dataSource is not an ICollection and cannot return a total row count.

- or -

dataBinding is false and dataSource does not implement the ICollection interface.

- or -

dataSource does not implement the ICollection interface and AllowPaging is set to true.

The CreateChildControls method is a helper method called by the DetailsView control to create the control hierarchy for the control.

Notes to Inheritors

When extending the DetailsView class, you can override this method to create your own control hierarchy.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2014 Microsoft